I am in a situation where i need to set a custom header on putting an object to an s3 compatible storage system. _, err := uploader.Upload(ctx, &s3.PutO
I am in a situation where i need to set a custom header on putting an object to an s3 compatible storage system. _, err := uploader.Upload(ctx, &s3.PutO
I am using Sockjs with Go, but when the JavaScript client send json to the server it escapes it, and send's it as a []byte. I'm trying to figure out how to pars
I looked at https://go.dev/doc/modules/gomod-ref and https://go.dev/ref/mod#go-mod-tidy, and on neither page could I find any documentation that explains how th
I have a Go project where I'm using Zap structured logging to log the contents of structs. That's how I initialise the logger: zapLog, err := zap.NewProductionC
I have following types declared type TestFn func(id int, ctx context.Context) error var Func1 = TestFn(func(id int, ctx context.Context) error { // do some w
When trying to use any instead of interface{} with the Go 1.18 toolchain, you can get the error: undeclared name: any (requires version go1.18 or later) Why is
What is the equivalent of this C# code in Go, how can I build it class ModelX<T> { public T Data { get; set; } } ModelX<int>
Versions Sarama - v1.32.0 Kafka - 5.4.6-2.12 Go - v1.16.2 sarama.Logger = log.New(os.Stderr, "[Sarama] ", log.LstdFlags) brokers := []string{ "kafka1
I created a trivial GoLang 1.16 GCP CloudFunction and deployed it. When I make a request to the endpoint, I see two blank lines in the log output. I can't figur
I've a simple golang web application, everything in main package, where http handlers are methods of an App struct embedding a DB pointer type
I would like to create a map, but I am unsure of the syntax. The map[string][]byte data type is giving me trouble, because I think that the e
Following code throws a compilation error cannot use ExampleProps (variable of type Props[Example]) as Props[Generic] value in return statement // Abstract ty
I have these 'structures' type Results struct { Gender string `json:"gender"` Name struct { First string `json:"first"` Last string `
Client-side code tlsconf := &tls.Config{InsecureSkipVerify: true} creds := credentials.NewTLS(tlsconf) opts = append(opts, grpc.WithTransportCredentials(cre
I have a channel that emits events. I'd like to set up an "oscillometer" on top of this channel, i.e. some sort of a "frequency counter" that gets constantly up
I'm not quite sure if which of the following approaches is the better approach to create a controller in kubernetes however I know that: I don't want to create
I'm generating a JWT and sending back to the user as a cookie. I see the response cookie in the network, but the brower isn't storing the cookie, which effectiv
I have a struct type InputData struct { SomeNumber int `json:"someNumber"` SomeText string `json:"someText"` } I do json.Unmarshal my http reque
I'm trying to implement pagination while selecting records from CosmosDB using cosmosapi package. The azure documentation states that continuation tokens never