Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 15:25
    cyanBone edited #2614
  • Jan 16 15:24
    cyanBone edited #2614
  • Jan 16 15:24
    cyanBone opened #2614
  • Jan 16 14:00
    elftech commented #2322
  • Jan 16 13:55
    elftech commented #2549
  • Jan 16 07:00
    codecov[bot] commented #2596
  • Jan 16 07:00
    Coverage (#2596) +0.00%
  • Jan 16 07:00
    codecov[bot] commented #2596
  • Jan 16 07:00
    Coverage (#2596) +0.00%
  • Jan 16 06:59
    codecov[bot] commented #2596
  • Jan 16 06:59
    Coverage (#2596) +0.00%
  • Jan 16 06:59
    codecov[bot] commented #2596
  • Jan 16 06:59
    Coverage (#2596) +0.00%
  • Jan 16 06:54
    codecov[bot] commented #2596
  • Jan 16 06:54
    Coverage (#2596) +0.00%
  • Jan 16 05:14
    thinkerou commented #2596
  • Jan 16 03:57
    laojianzi commented #2596
  • Jan 15 10:42
    zoujialing125 edited #2613
  • Jan 15 10:40
    zoujialing125 opened #2613
  • Jan 15 07:41
    cloudmer closed #2611
complib2891
@complib2891
hi, gin-contrib/sessions, redis_test.go is failing, anyone know how to fix it?
Cesc
@cesc1802
what is the best practice to write middleware to handler error using gin-gonic ?
drone-ci-dev
@cchang62
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.
mahdi
@thisismz
1_dYCHVggxdpot-ExNFJ-k6w.png
How to rewrite the above code in gin?!
Cesc
@cesc1802
@thisismz gin does not support Http client
mahdi
@thisismz

@thisismz gin does not support Http client

thanks alot can you suggest another packet

1 reply
Cesc
@cesc1802
@thisismz I think you can write small package support it base on net/http package
Joshua Hemmings
@jLemmings
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?
Sagar
@Segamegadrive
Hi
Gergely Brautigam
@Skarlso
@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 :)
neoisone
@neoisone
@neoisone
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
michaelzh
@zhongwm
Assume we have a recursive function with a os.File::Close() as defer invocation, Could it be tail-recursive?
Muhammad Ahsan Izhar
@ahsanghalib
hello, i am new to Go world I am trying to shift some code base from NodeJS but results are different. why...
check this
go-node-01.jpg
happy air
@checkping_gitlab
sorry
qilx
@qilx
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?
qilx
@qilx
I found it out. Solution is router.NoRoute() + c.DataFromReader()
romantic艾克
@1sunzichen
Iam coming
gopher
RaminCH
@RaminCH
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?
shyan
@shyan1
Have you had git installed on your machine ? @RaminCH
It's strange to have such issues.
RaminCH
@RaminCH
Hi
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
RaminCH
@RaminCH
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
ahmar siddiqui
@ahhmarr
Hello good people 👋
is there any comprehensive guide that I can refer to regarding implementing testing in gin?
1 reply
Ghost
@ghost~5fbfef87d73408ce4ff5092d
hello
juemingzi
@gojuemingzi
world
simisimi
@iamatsundere
Hi team, I am new in Go. I have an issuse with authorization api resources and scope.
simisimi
@iamatsundere
For example, I have 2 apis (resources) like /users and /projects. /users has 2 subpath like /users/get and /users/delete, I just want to pre-check the permission of the access request, which comes with authorization info. For example, parsing the request and we got scope 'delete' and resource 'users', it can access /users/delete, but when access /users/get, it is denied. So my questtion is how can I define the scope and permission for endpoints in Go Gin? Thanks for reading!
1 reply
mahdi
@thisismz
Hello everyone
I have a question
I want to write a program that, for example, has a timekeeping function and We also have an infinite loop function to receive instant input from the user and print it
And also is very important to both work together
Do not wait for the first function to end
Mohammad Fayaz
@fayaz07
anyone running http2
Ryan W
@twentybit
Hi, is there an example of checking for mandatory request headers, and responding with a useful error back to the caller? I can easily catch this with ShouldBindHeader but I don’t get the reason as an err?
tyagip966
@tyagip966

Hello everyone,
I'm getting context cancelled error inside my go routine below is my code.

func (service maintenanceHandler) CardHandler(ctx *gin.Context) {
    var requestBody models.DefaultTicket

    //perform some action.

    go doSomethingElse(requestBody.Priority,ctx)
}

I also tried with

func (service maintenanceHandler) CardHandler(ctx *gin.Context) {
    var requestBody models.DefaultTicket

    //perform some action.

    go doSomethingElse(requestBody.Priority,ctx.Copy())
}

In both the case I'm getting CONTEXT CANCELLED inside go routine method, can anyone please help me in this?

Mohammad Fayaz
@fayaz07
Hi, how can I send the response and execute some code after sending the response to reduce response time