I have found myself writing the same function X number of times to get different types of Items out of my go-cache. The duplicate functions ar
I want to write regex to recgonize a hex string with length of 16 bytes, for example: 1a2b3c4d1a2b3c4d The following answers is NOT correct: [0-9a-fA-F]{16} b
I want to write regex to recgonize a hex string with length of 16 bytes, for example: 1a2b3c4d1a2b3c4d The following answers is NOT correct: [0-9a-fA-F]{16} b
Could somebody explain me next rows: var a, b = 2.0000001, 3.00000 fmt.Println(a + b) fmt.Println(2.0000001 + 3.00000) results of prints: fir
I want to know if there is a non OS-specific way to test if a Go program is launched by using the go run command or by executing the binary produced by the go b
I have a bare repository in which I need to add and commit a set of files. As far as I understand it, adding files to the index requires a worktree. Using git o
I am using counters to count the number of requests. Is there any way to get current value of a prometheus counter? My aim is to reuse existing counter without
I am trying to build my go apps on a docker file. Inside my go.mod there is private package that needs authentication/ssh. This question is similar to Building
I am explaining with a simple example see my MongoDB collection looks like this: [ { pid: erwer, qty: 3, LevelDetails: {
Is there any way to get the rows that have been updated using the update command in Gorm, using a single operation.
Consider the following code in main/entry function r := chi.NewRouter() r.Use(middleware.RequestID) r.Use(middleware.RealIP) r
Atm, I work on a bunch of distributed microservices in go which I want to trace. I have an "api-gateway" that works via REST and then calls the needed microserv
So I had this question before and I had an answer below the question which worked, but I just realized that the query I came out with does not work as planned.
The task is to write a function that returns all its neighbors for an element. Diagonal elements are not considered neighbors. In general, the problem is solved
Why cyrillic strings in hexadecimal format differ from cyrillic chars in hexadecimal format? str := "Э" fmt.Printf("%x\n", str) //result d0ad str :
I have a Golang program from which I have created a package using gomobile bind. It creates two files abcd.jar and abcd.aar. I have copied these 2 files to the
I am looking to write unit tests for Go code that uses pgxpool to interact with a postgres database. Is there a test framework that will stand up a dummy or moc
My goal is to validate whether the tutorial given by w3schools is true, I use w3schools#Memory Efficinecy as reference. I quote from the tutor
I am able to add "Weighted" A records for the AWS Route53 using the API, using [Weight: aws.Int64(weight)], it works great using the code below. But how
I just updated to the new version of Go - Go version 1.16.2 Linux/amd64 and am getting an error when I build a Hello, World! example: go: go.mod file not found