package main import ( "time" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.Se
My goal is to see the logic behind func len() in Golang. I use VS Code for IDE. The problem is when I tried to do Go to Implementation, it returns No implementa
I have a JSON object That contains an implementation of an interface within it. I'm attempting to take that JSON and marshal it into a struct whilst creating th
I’m programming the role based access control with casbin. However ,the police need me to provide urls that the role has. The “v1” column in t
I know that I can add headers to each HTTP request manually using cli := &http.Client{} req, err := http.NewRequest("GET", "https://myhost", nil) req.Heade
I'm using golangci-lint and I'm getting an error on the following code: versions []ObjectDescription ... (populate versions) ... for i, v := range versions {
If I have a two different structs, that mostly overlap each other in regards to their property types, and I need to create one from the other, is there some mor
For long running activities we can use heartbeats to notify whether the activity is running or dead. We have a workflow that invokes multiple child workflow w
I am trying to write a rest endpoint using gin which should return status 200. I have coded it as well in the same way, but am getting status 400. My code is as
I wonder if/how it's possible to add dynamic labels. I don't know the key or the quantity of the labels which I would like to add to my gauge values. What I tr
I am trying to create a simple cli tool in Go using a TOML config file. I want to be able to store frequent commands I use on the command line for other tools,
Let's have a look at this: ✓ Hello, 世界 As you can see there is a unicode checkmark and chinese/japanese characters. In go, If I use MSYS
To check authorization i need to know the route inside the authorization middleware. I checked docs from go-chi and did it that way: func Authenticator(next htt
Im a newbie in golang. I am trying to compare two yaml files and update the 2nd file's value if there is any new value in 1st yaml for that particular key. So t
I need to retrieve the values of sub-claims from a JWT in Go. I have (legacy) JWTs I need to parse in go, which contain a custom claim "data" which holds an Js
I am working on a go project, which has a dependency on original-project. I now want to change the behavior in this project by modifying original-project. So I
I set up a series of gRPC requests and responses which all work fine, but I'm stuck when I try to get the client IP address and user-agent who is calling my gRP
I would like to parse a package and output all of the strings in the code. The specific use case is to collect sql strings and run them through a sql parser, bu
I'm trying to parse git branch names and split them so I can seperate the remote and the branch name Previously I just split on the first slash: func ParseBra
As stated in the title, whenever I set my response header to be any status code besides the default (200), I receive a response error in my logs. This did not h