Questions tagged [glide-golang]

Glide is obsolete, use Go Modules instead! Glide is a package manager for Go that is conceptually similar to package managers for other languages such as Cargo for Rust, NPM for Node.js, Pip for Python, Bundler for Ruby, and so forth.

!! Don't use Glide !!

Glide has been obsoleted by Go Modules for many years now. Use Go Modules instead.

Homepage

Github

Documentation

132 questions
0
votes
1 answer

Say The Numbers - Sololearn Go Challenge

I'm currently learning Go using the SoloLearn App. The Challenge was : Taking 3 numbers in the range of 0-10 as input and output the corresponding texts in English. Test Case #1, Test Case #3, Test Case #4 and #Test Case #5 were successful. But I…
0
votes
1 answer

eko gocache for redis :: store.RedisStore does not implement store.StoreInterface

I am using this library https://github.com/eko/gocache for redis with go lang My code is package main import ( "context" "fmt" "time" "github.com/eko/gocache/cache" "github.com/eko/gocache/store" "github.com/go-redis/redis/v8" ) func main() { ctx…
chetanspeed511987
  • 1,995
  • 2
  • 22
  • 34
0
votes
1 answer

appending to YAML file using go lang

I writing a golang program which append rule to the file as mentioned below Required format: customRules: custom-rules.yaml: |- - rule: Pod Created in Kube Namespace append: true condition: and (k8s_audit_never_true) source:…
Sathya
  • 69
  • 2
  • 8
0
votes
3 answers

how to stop multiple go routines

i have to invoke goroutuine /thread from a loop. Because of the loop, there are many go routines executes in parallel. If any routine/thread executed successfully, then i have to stop all other thread/routine. Is there any way to implement this?
sumith
  • 29
  • 1
  • 7
0
votes
1 answer

how to Extracting data from XML

I am working on extracting data from a xml output. I have written the below code. I just need to extract dept number from the below xml. On running the below code getting a null output. Can someone let me how to extract the dept number from the xml…
0
votes
1 answer

How to select a year in GORM

I'm new programming by Golang and Databases and I'm doing a filter where I have a Row "created_at" in format "YYYY-MM-DD HH:MM:SS" and I want to select just from a year, here is the line what I have: func SelectedYear(database string) (consult…
0
votes
1 answer

Retract Go functionality - retract older package versions as insecure, incompatible, or broken

I have a problem with one of my project release, where we did a release 1.0, but it was a mistake that we later analysed and our actual stable release is 0.7 and in future also we will be doing minor changes, so we want to refrain our user to use…
s_k_t
  • 689
  • 1
  • 15
  • 36
0
votes
1 answer

Golang: Explain DumpRequest and DumpResponse HTTP/2

clientt := &http.Client{ Timeout: 30 * time.Second, } var tr = &http2.Transport{} clientt.Transport = tr I create a client and send http/2 request. with http2 transport but in DumpRequest I see GET / HTTP/1.1 Host: www.xxxxq23.com In response…
Alex
  • 13
  • 2
0
votes
1 answer

I need solve a problem with websockets on golang server

I have a server on GoLang and googollee/go-socket.io. When the server and the client work on the same port, the sockets work normally. But when I start they are on different ports an error occurs on the client: WebSocket connection to…
ksksks
  • 31
  • 2
  • 6
0
votes
1 answer

*http.http2gzipReader vs io.ReadCloser Golang

In the defination of the source code of response.go it is defined that the Body of type io.ReadCloser but while printing the type of Body by the following code it prints *http.http2gzipReader. Are they both same? package main import ( "fmt" …
Abishek Bashyal
  • 307
  • 1
  • 6
  • 15
0
votes
1 answer

Can I update go mod dependence package without adding a new tag for the dependence package

I have two code repository A and B in Go, A depends on B using gomod management. For example, the latest tag version of B is v1.0.1 and the same version in A's go.mod, and then some new commits are merged into B, but without upgrade tag. Can I get…
0
votes
1 answer

Err: cannot use c.Param("id") (type string) as type int in argument to services.GetCharactersID

Following code has the err: Error: controllers/controllers.go:80:53: cannot use c.Param(id) (type string) as type int in argument to services.GetCharactersID controllers/controllers.go:80:54: undefined: id) func GetCharactersID (c *gin.Context) { …
Javier
  • 11
  • 1
  • 4
0
votes
1 answer

Why "undefined: StackGuardMultiplierDefault" error?

describe When I clone GoAdminGroup/go-admin projectin github and run the project by the steps of README.MD file , I get this error TEST-MBP:example TEST$ GO111MODULE=on go run main.go go: downloading github.com/mattn/go-sqlite3 v1.11.0 go:…
jasondayee
  • 549
  • 4
  • 11
0
votes
1 answer

cannot find package "http/template" in GoLang

While using the http template i encountered with below error: TMLTemplate.go:4:3: cannot find package "http/template" in any of: c:\go\src\http\template (from $GOROOT) C:\Users\username\go\src\http\template (from…
0
votes
1 answer

How can I pull older branches of a package from github using go get command

From this link: https://github.com/googollee/go-socket.io/tree/v1.4 I want to get this module. How can I do it? I don't want to get master module, but I want to get v1.4 branch. When I use the following command, it downloads master module: go get…
melina
  • 195
  • 1
  • 8
1 2 3
8 9