I want to create a function that can retrieve data that has no duplicates from a slice an example of a slice that will be processed: number1 :
I started learning Golang. And I have this project, where I need to stream some data from API via WebSocket connection, and print it in the console. And the t
Using the following code: func GetPods(clientset *kubernetes.Clientset, name, namespace string) ([]corev1.Pod, error) { list, err := clientset.CoreV1().Pod
I can't run the go program on vscode on my Win11 computer (no run button, pressing Ctrl+F5 or F5 doesn't work,like this: vscode ) and I can't debug it. It's not
can anyone figure this out? I think the problem might be in the readstring() argument when being passed to the create file function. I tried resolving it by str
I´m trying to unzip files in Go (Golang) using the zip lib. The problem is that when the zip file has been zipped in windows all special characters get me
I was working in Google CLoud and all was fine.. but when I clone all my project in my PC, I have this messages in every JSON struct. struct field tag bson:"ed
I am refer to the post How to execute system command with unknown arguments? to run a jq command on my ubuntu shell. Below is the code I tried import ( "fmt
I have a CDN in gcloud configured with a storage bucket backend, the bucket is private and I give the ObjectViewer permission to the CDN service account (servic
I have added a new CRD ApiGateway to Kubernetes and I want to watch for new/changed resources of it. This works with a simple Rest Client as shown in the examp
implementing a https go server with wildcard certificate support. package main import ( "crypto/tls" "log" "net/http" "golang.org/x/crypto/acme
Recently I've participated several Go job interviews. The first one asked me How is channel implemented?, then the second one asked How is gor
In my template I sort by months my post like this: {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "January, 2006" -}} <
Following the docs on how to set up a gRPC gateway, I find myself stuck at step four of generating the grpc gateway. Namely, things fall apart when the followin
I have the following pipeline, which I want to use it in Golang and convert it to bson.M. One way is using bson.UnmarshalExtJSON but I want to know what is exac
I have a Gorilla Mux router setup inside a function that returns *mux.Router, goes like this func MakeApp(services service.Service, pe PolicyEnforce) *mux.Route
type SipField interface { Info() (id, name, defaultValue string, length int) } type Field string func (f *Field) Get() string { return string(*f) } f
type SipField interface { Info() (id, name, defaultValue string, length int) } type Field string func (f *Field) Get() string { return string(*f) } f
I have a Gorilla Mux router setup inside a function that returns *mux.Router, goes like this func MakeApp(services service.Service, pe PolicyEnforce) *mux.Route
I am just learning about mutexess. I thought the following program would return a total of 1000, but I am getting varied results, so I assume I am doing someth