74,494 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-2
votes
0
answers
61
views
How to prevent resource leaks in Go (based on given TCP connection example)? [closed]
I've been playing with a very simple TCP server in golang (net.Listener + net.Conn). Within my code I open a TCP connection and pass it to a goroutine to read data from it. In that goroutine, I think, ...
1
vote
0
answers
31
views
"swaggo init" reports the error: cannot find type definition: dto.ArticleModelCreateParams
The command I executed:
swag init -g cmd/server/main.go --parseInternal --parseDependency
My project structure:
/cmd
└─ server/main.go
└─ server/wire.go
└─ server/wire_gen.go
/internal
└─ app
...
2
votes
0
answers
43
views
Cloud Task sporadically responds with 403
When scheduling Cloud Tasks in GCP from within a Cloud Run Function I sometimes (~40% of the time) get a 403 error once the Cloud Tasks runs (the second internal Cloud Run Function). I generate an ...
0
votes
0
answers
71
views
Why is go build trying to download local code, but only in gitlab
We have a project with 3 git repositories, let's call them backend, ui and library, hosted at gitlab.com/mycompany. These build quite happily.
I am trying to move the three repos into one, so we now ...
Pete 's user avatar
- 1,321
1
vote
1
answer
54
views
Go terraform unrecognized import path from GCP Artifact Registry
I get an error when trying to download private go dependencies from artifact registry via terraform:
│ Error: Error waiting to create function: Error waiting for Creating function: Error code 3, ...
Best practices
1
vote
0
replies
33
views
Where should I create the application session when using an internal SSO (Gin + OAuth2)?
I’m integrating an internal SSO (OAuth2) into a web application using Gin (Go), and I’m a bit unsure about the right place to create the application session.
The SSO is the only authentication ...
0
votes
0
answers
58
views
How do I use the Terratest shell module? [closed]
I’ve been trying to use the Terratest shell module to execute bash commands, but I haven’t had much success. Documentation appears to be limited, and most references I found were via AI tools. Below ...
2
votes
0
answers
40
views
inlay hints don't work for golang in neovim?
i have hints working for lua, but not for go.
i've already tried a bunch of stuff like several go configs, though it seems like it is a server problem, because Settings: {} is what i get in ...
-2
votes
0
answers
80
views
How can http.Server be made to hold open a connection? [closed]
I'd like to add a unit test for Go's http.Server.Shutdown() timing out, but there are no connections held open when the shutdown signal is sent, so it never gets to checking for timeouts, even though ...
1
vote
0
answers
32
views
Trouble decrypting CiphertextForRecipient after KMS GenerateDataKey
I'm building a route for my go (gin) server that generates a Data Encryption Key (DEK), following the principle of zero-trust (the backend never sees the plaintext).
Right now, the client generates a ...
-2
votes
0
answers
78
views
User providable Stateful plugins In Go [closed]
I am working on smtp library to act as mux for smpt. User define config with multiple smtp downstream servers and the service. This service will act as proxy between down streams and upstream. Purpose ...
1
vote
1
answer
79
views
Accessing postgres db using pgxpool in a goroutine
I have created a function to return the db connection of a postgresdb using pgxpool. But I don't want to create multiple pools since i will be calling this function each time to execute a query.
Since ...
3
votes
0
answers
31
views
Why does Milvus Go RowBasedInsertOption conflict with Function-generated sparse vector fields?
I’m using Milvus 2.5 with the Go SDK (v2.5.1) and ran into an issue when inserting data into a collection that uses a Function-defined field together with RowBasedInsertOption.
In my collection schema,...
Advice
1
vote
0
replies
61
views
How to configure settings.json for Python, Vue, and Go in Zed editor on Windows?
I use the Zed editor for development on Windows 11, with my main technology stack being Python, Vue (including JavaScript/TypeScript), and Go. I have been trying to configure settings.json myself, but ...
Advice
1
vote
2
replies
88
views
How to get count of physical USB ports on Windows (not changing when devices are attached) using Go?
I am working on a Windows application written in Go lang, and I need to programmatically determine the number of physical USB ports available on the system.
My requirement is:
The count should ...