Questions tagged [go-gin]

Gin is a HTTP web framework written in Go.

It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

Docs

GitHub

755 questions
-4
votes
2 answers

Read request body without draining it using json.decoder

I have an application which is reading a large number of requests (approx 4-5 million reqs / second) I am using json.decoder to read my incoming json data from the request body. my code : err := json.NewDecoder(c.Request.Body).Decode(&obj) The…
mythic
  • 535
  • 7
  • 21
-5
votes
1 answer

cannot use phone (type string) as type int in assignment

I have an error "cannot use phone (type string) as type int in assignment", how to fix this? I use in github.com/gin-gonic/gin and github.com/jinzhu/gor package main import ( "github.com/jinzhu/gorm" "github.com/gin-gonic/gin" ) type…
rsmnarts
  • 185
  • 2
  • 14
-6
votes
2 answers

assert interface{} to int64

i am using gin, i use c.shouldBind to bind the data to the struct, the use c.set to set the params in the context. when i use c.getInt64 to get the params, it can't return the value i set in the context(i set a 1), it return a zero. it failed to…
shadow
  • 99
  • 6
1 2 3
50
51