Category "go"

Golang TLS handshake error - "first record does not look like a TLS handshake"?

Client-side code tlsconf := &tls.Config{InsecureSkipVerify: true} creds := credentials.NewTLS(tlsconf) opts = append(opts, grpc.WithTransportCredentials(cre

Channel frequency counter

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

What is the best approach for creating a controller in Kubernetes?

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

Response cookie not being set in browser storage

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

Golang field type validation

I have a struct type InputData struct { SomeNumber int `json:"someNumber"` SomeText string `json:"someText"` } I do json.Unmarshal my http reque

Golang / CosmosDB Pagination

I'm trying to implement pagination while selecting records from CosmosDB using cosmosapi package. The azure documentation states that continuation tokens never

How Can we Configure Camunda Process Engine in Golang?

I found links on process engine Configuration https://docs.camunda.org/manual/7.16/reference/deployment-descriptors/tags/process-engine/ But how to use this in

convert int to ascii - more than one character in rune literal

How do I convert into to its ASCII? In java it's System.out.println((char)(49)); //gives 1 I tried a := '42' fmt.Println(rune(a)) I get more than one character

Permission denied when installing go mockgen

I am trying to install the mockgen package on go, but I keep receiving a permission denied without knowing why: go install github.com/golang/mock/[email protected]

How to ignore a .go file in a module?

I am rewriting in Go a home-grade program of mine that was previously in Python, learning on the way. As I reconsider whole sections of the code, it would be gr

Panic Related to Garbage Collector When Running Go Program

I installed a Go program from GitHub and when I run it, I get the error, panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare

package to encapsulate float64 in protobuf

I was working in a microservice to create subscriptions in Stripe. One of the fields is listed as a float64 where I set it up as a float in the .proto file. Thi

When the TCP connection close in this code?

When I read this opensource code. I have two questions about the two functions: func listenTCP() { for { conn, err := tcpListener.Accept() i

Is there any query builder for InfluxDB in Golang?

I am new to InfluxDB and trying to do query in my local InfluxDB using Go client. The parameterised version of this doesn't seem to work as intended and they me

how to import vscode path

I am receiving the following error from vscode when i try to edit a go file: "Error loading workspace: You are outside of a module and outside of $GOPATH/src. I

How to parse POST request body with arbitrary number of parameters in Go Fiber/ fasthttp

type Person struct { Name string `json:"name" xml:"name" form:"name"` Pass string `json:"pass" xml:"pass" form:"pass"` } app.Post("/", func(c *fiber.Ct

what does "lst := List[int]{}" mean in Go [duplicate]

Here is the part of Go code I am reading: func main() { var m = map[int]string{1: "2", 2: "4", 4: "8"} fmt.Println("keys m:", MapKeys

Location of methods in memory [duplicate]

I am new in Go world, the question could be obvious. Let's say I have a struct Example, which has some methods: type Example struct {} func (

fabric invoke chaincode error: Failed to get endorsing peers: no endorsement combination can be satisfied

I have set up my fabric network with 3 orderers in one organization and a consortium with 5 organizaitons successfully. Each organization has only one peer node

Go import scope lookup for protobuf types

I'm building a transpiler and need to understand the protobuf/go scope lookup system. I've been trying to google the docs and finding no luck. Q: Is there a sha