Skip to main content

Questions tagged [go]

Go is an open-source programming language, with a syntax loosely derived from C. It's statically typed, with limited dynamic typing capabilities; it also features automatic memory management, built-in concurrency primitives, variable-length arrays – called slices –, and a large standard library.

go
0 votes
0 answers
14 views

Do daughter child die if their parent dies in Go?

I'm writing a web server to handle websockets in Go, so, I have the following code: func StartComunication( ctx context.Context, userID string, connectionRepo ports.ConnectionRepository, ) ...
Diego L's user avatar
  • 790
-1 votes
1 answer
24 views

How To Unit Test Receiver Function That Uses Another Receiver Function

Let's say you have the following type Person interface { GetFullName() string PrintName() } type Banker struct { FirstName string LastName string } func (b Banker) GetFullName() string { ...
Captain Save A Hoe's user avatar
-1 votes
1 answer
24 views

Variable used inside function reported not used

This works fine: package main var foo string func main() { fn := func() { foo = "AAA" } fn() } But if we move the variable declaration inside main(): package main ...
Greendrake's user avatar
  • 3,714
0 votes
1 answer
24 views

libwebp Undefined symbols for architecture arm64: _SharpYuvConvert

Trying to compile the go-webp package using Bazel. This involves compiling libwebp from sources. Here's how I'm retrieving libwebp's sources: # WORKSPACE git_repository( name = "libwebp",...
Victor's user avatar
  • 14.5k
1 vote
0 answers
16 views

How to correct a condition according to site lang with Hugo cms?

Hello everyone and thank you for taking the tile to help me. I need to do a condition according to the language of a website. In the following partial i need tp display an aria label according to the ...
user25971064's user avatar
1 vote
2 answers
49 views

Need help in preventing multiple crons/scheduler running in golang

I'm working on a Go microservice where I am using robfig/cron package to schedule jobs, initially thought of using time.Ticker() but package made it easier for me. My question is how to ensure cron ...
Harry's user avatar
  • 25
-1 votes
0 answers
17 views

The following problem occurs when using harbor's oidc [closed]

** I have tested it and the oidc server is working.. ** Problem INTERNAL_SERVER_ERROR","message":"failed to verify signature: failed to verify id token signature /harbor/src/lib/...
zenhou's user avatar
  • 1
-2 votes
0 answers
20 views

Golang test cases for gin failing [closed]

Hi All I am trying to create a test cases for my gin gonic framework where I am using Gorm and ORM but I am getting errors like this: [31m2024/07/03 08:48:19 [Recovery] 2024/07/03 - 08:48:19 panic ...
Nilay Singh's user avatar
  • 2,287
0 votes
1 answer
26 views

Inject default Context into go-grpc server (e.g. logger injection)

The golang go-grpc grpc.NewServer(...) call appears to lack any means to inject a default context.Context that should be inherited by all server gRPC call handlers. Is there a sensible and simple way ...
Craig Ringer's user avatar
-1 votes
1 answer
31 views

Cannot import go-gl library - "build constraints exclude all Go files"

I'm very new to golang, sorry if this is obvious. I've followed the steps from the project Github, and here is my exact procedure (with error): $ go mod init mydomain.com/test $ go mod tidy $ go get -...
ifiht's user avatar
  • 558
0 votes
3 answers
45 views

Same struct in two different packages Golang

I have this piece of code: import ( "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric-protos-go/common" "github.com/hyperledger/fabric-protos-go/...
André Avelar's user avatar
1 vote
0 answers
24 views

Scrape PDF in golang

Hi can anyone help me how can I use https://pkg.go.dev/github.com/pdfcpu/[email protected] to extract human readable String via scrapping a pdf. FYI I am using AWS lambda: Here is my code snippet: package ...
kishor purohit's user avatar
-4 votes
2 answers
46 views

why nil is valid for any but not [T any]?

from Return default value for generic type You can't return nil for any type. If int is used as the type argument for T for example, returning nil makes no sense ain't these two statements ...
duckydude20's user avatar
2 votes
2 answers
25 views

Building with Fyne - cannot find -lopengl32: No such file or directory

I'm trying to set up an application using Fyne, starting with just the basic template it gives. However, when building the application I get this message, and nothing runs: PS C:\Users\kmall\OneDrive\...
Kyle Malling's user avatar
1 vote
1 answer
35 views

GORM Help w/ Postgres: unsupported data type [closed]

I'm trying to read through the CVE List to put all the entries into a central database. When I try to create an entry to this databse, I get an error: 2024/07/02 14:03:13 /x/db.go:68 unsupported data ...
Aidan Gatenbee's user avatar

15 30 50 per page
1
2 3 4 5
4894