Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 15:06
    Ismail14098 opened #2566
  • 11:57
    libi commented #2565
  • 11:38
    tim-montague commented #2559
  • 11:38
    tim-montague commented #2559
  • 11:36
    tim-montague commented #2559
  • 11:30
    tim-montague commented #2559
  • 11:29
    tim-montague commented #2559
  • 11:10
    tim-montague commented #2559
  • 11:06
    tim-montague commented #2559
  • 10:52
    tim-montague commented #2559
  • 10:48
    tim-montague commented #2559
  • 06:34
    Travis gin-gonic/gin (master) still failing (4747)
  • 04:11
    Xieyuschen opened #2565
  • 03:55
    Xieyuschen commented #396
  • Nov 22 09:39
    Coverage (AUG-8000) +0.00%
  • Nov 22 06:20
    Travis gin-gonic/gin (master) still failing (4746)
  • Nov 21 07:25
    Travis gin-gonic/gin (master) still failing (4745)
  • Nov 20 20:11
    hussainhyder23 opened #73
  • Nov 20 14:19
    dongshimou commented #471
  • Nov 20 08:18
    Travis gin-gonic/gin (master) still failing (4744)
Jarrod Roberson
Is it on topic to post a link to an issue on the github issues to get some visiblity/help on it?
I want to ask a question about getting input parameters
type GetTxListIM struct {
    Page uint64 `form:"page" default:"1"`
    Rows uint8  `form:"rows" default:"10"`
    Type     []uint64 `form:"type"`
This is the structure content of the data I want to get
//@Param GetTxListIM query transaction_dto.GetTxListIM true "GetTxListIM"
//@Success 200 {object} transaction_dto.TxListOM
//@Failure 400 ""
//@Failure 500 ""
//@Router /Transaction/GetTransactionList [get]
func (controller *TransactionController) GetTransactionList(c *gin.Context) {
    var input transaction_dto.GetTxListIM
    if err := c.ShouldBind(&input); err != nil {
This is the Get method, here to parse the data
{"level":"panic","msg":"strconv.ParseUint: parsing \"1,2\": invalid syntax","time":"2020-08-28 16:58:15"}
Please help me thanks
Jarrod Roberson
I am trying to create a route that will let me match the rest of the path portion of the relativePath as a .Param() I have r.PUT("template/:path", template.PutTemplate) and if I call it with template/path/to/my/template.txt I want .Param("path") to return path/to/my/template.txt is this possible?

Hello o/,

Is there any way to use multiple authentication middlewares for the same route ?
We use https://github.com/appleboy/gin-jwt and a custom auth middleware based on generated tokens in the database, but we're unable to set them for the same route. If someone has a solution or a workaround to be able to authenticate users from jwt token or from the generated token please.

Anybody can help me with this problem. gin-contrib/sessions#123
hi, gin-contrib/sessions, redis_test.go is failing, anyone know how to fix it?
what is the best practice to write middleware to handler error using gin-gonic ?
hi, gin-contrib/sessions. When I use and initiate redis as my session store, how can I get my session ID? I want to append this session ID to cookie, and then I can make a double verification on each http request or do other securities. No idea if I can assign an UUID to session name, and then get the session with the UUID in other place of web application? I also use go-gin as my base, by the way.
How to rewrite the above code in gin?!
@thisismz gin does not support Http client

@thisismz gin does not support Http client

thanks alot can you suggest another packet

1 reply
@thisismz I think you can write small package support it base on net/http package
Joshua Hemmings
Currently I am serving my Vue frontend with a static route: r.Use(static.Serve("/", static.LocalFile("../frontend/dist", false)))
I would like to add the frontend in the compiled binary for easier deployment. I've tried to get it done with pkger but did not have any success. Any other idea?
Gergely Brautigam
@jLemmings You can use rice for example to achieve this. Check out -> https://github.com/gaia-pipeline/gaia/blob/master/Makefile#L21 for an example.
Or another one I really like is github.com/jessevdk/go-assets-builder
Gaia is using Vue so that should help you out a lot :)
can anyone forward me to any channel specific to docker content trust. Notary server!
I am doing a POC and facing issues
src/github.com/go-sql-driver/mysql/driver.go undefined: driver.connector
go version
go1.15 linux/amd64
any help is appreciated
my manager is killing me 🤪🤪🤪
I found that it was possible with go version higher than 1.10 and looking at the v 1.15 it should be supported right?
th m
Assume we have a recursive function with a os.File::Close() as defer invocation, Could it be tail-recursive?
Muhammad Ahsan Izhar
hello, i am new to Go world I am trying to shift some code base from NodeJS but results are different. why...
check this
happy air
Hi, please I need help. I have assets in vfsgen and using router.StaticFS(). That works well. But I would need for each request path ending with "/" (directory) return "/index.html" from vfs. Any idea please?
I found it out. Solution is router.NoRoute() + c.DataFromReader()
Iam coming
Hi everyone!
I am very new developer and faced with such a problem while installing Gin on Ubuntu
/go/src$ go get -u github.com/gin-gonic/gin
package github.com/gin-gonic/gin: directory "/home/user/go/src/github.com/gin-gonic/gin" is not using a known version control system
Maybe someone knows the solution?
Have you had git installed on your machine ? @RaminCH
It's strange to have such issues.
Hi @shyan1
Yup, Go_lev.2_RestAPI/Lec13$ git --version
git version 2.17.1
I even deleted and reinstalled
Also I installed Gin with: sudo apt-get install -y golang-github-gin-gonic-gin-dev
but it is very unconvenient, as no any packages linking, I write evry module manually and it is still not working
If it may clear I also get this kind of message:
/go/src$ go get github.com/gin-gonic/gin
package github.com/gin-gonic/gin: no Go files in /home/user/go/src/github.com/gin-gonic/gin