Questions tagged as 'golang'

1
answer

Problem when creating WebService in Golang

I am doing a WS , where I make a query to the database, as the database to which I made the query is Informix , the connection was made through ODBC , the problem that I have is when creating the json due to the variabl...
asked by 25.05.2018 / 22:20
1
answer

Points and commas in Golang, recommended at performance level?

I know that the use of; in GOlang, but for the compiler of Golang that is more efficient, what should we say or not?     
asked by 02.11.2018 / 17:43
2
answers

UTF8 Encode and Decode in GO Golang

I would like to know how I can apply the utf8 to a string in golang. Investigating in the documentation , do the following: I am making a query to a database and in the field the following information is stored ANDRÉS NUÑEZ when makin...
asked by 29.05.2018 / 15:50
1
answer

Associations in GOLANG using GORM

Good morning, I have the following structures: /* * User */ type User struct { ID uint 'gorm:"primary_key" json:"id' Name string 'json:"name"' Email string 'json:"email"' Pass...
asked by 24.02.2018 / 19:50
1
answer

Problems importing your own package into Go

I am just beginning in this programming language called Golang, I am in the part of exporting own packages to the main package, when exporting them and placing the address in the code, the slash are in this way "/" and that way is also in the te...
asked by 23.06.2018 / 21:41
1
answer

Problems when creating a record with Go and Postgresql from GORM Data type time.Time

When I try to send information from POSTMAN, I get an error with dates Error Line: err: = json.NewDecoder (r.Body) .Decode (& amp) ERROR: {"message": "Error reading the data of the entities to be registered: parsing time \" 2012-12-...
asked by 05.06.2018 / 15:33
0
answers

golang gin web framework, invalid memory address or nil pointer dereference

I'm doing tests with gin and gorm , I have the following program: package main import ( "fmt" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" ) var db *gorm.DB var err error t...
asked by 22.05.2018 / 23:22
1
answer

golang framework gin problems when running govendor fetch

I'm trying the next gin that is a go framework link The installation process takes the following steps: Go get govendor $ go get github.com/kardianos/govendor Create your project folder and cd inside $ mkdir -p $GOPATH/src/...
asked by 22.04.2018 / 22:28