These are chat archives for gin-gonic/gin

Jun 2015
Jun 12 2015 04:28
This message was deleted
Jun 12 2015 05:23
It return me to an error: "no user(s) into the table". Anything wrong on my code? Need help :)
type DeviceInfo struct {
    Id        int64       `json:"id"`
    User      int64       `json:"user"`
func DeviceList(c *gin.Context) {

    var device []DeviceInfo
    _, err := dbmap.Select(&device, "SELECT, As user  FROM userdevice inner join user On userdevice.user_id =")

    if err == nil {

        c.JSON(200, MessageInfoDevice{
            Status:  "#200 Ok",
            Message: "Data Found",
            Data:    device,

    } else {
        c.JSON(404, gin.H{"error": "no user(s) into the table"})

Nick K
Jun 12 2015 07:17
@ambo1994 it's not really a question about Gin
@ambo1994 but if you returned err.Error() instead your string it could help ya
Roman Zaynetdinov
Jun 12 2015 07:59
Hi! Has anyone worked with go-bindata and gin? I need to bind my static files and templates as well. Any sources?
Roman Zaynetdinov
Jun 12 2015 08:09
I found how to serve static files based on this example. So now I am struggling with loading templates.
Joonathan M├Ągi
Jun 12 2015 08:24
@radutopala this seems to be an option as well
Jun 12 2015 19:08
Hi all, I have a very strange bug with templates: cURL output have <pre></pre> tag before <!DOCTYPE html> but it doesn't exist in the html code