74,402 questions
1
vote
0
answers
51
views
CGO: printf won't print unless followed by fmt.Println
I'm running the below program on Windows and when I run it I don't see Hello. Uncommenting fmt.Println() will cause Hello to appear, however there seems to be nothing I can do in C that will get the ...
-1
votes
1
answer
29
views
json indent on json experimental v2 - how does it work [duplicate]
b, _ := json.Marshal(output)
(*jsontext.Value)(&b).Indent()
fmt.Println(string(b))
I found the above code here: https://pkg.go.dev/github.com/go-json-experiment/json
The code works, but I don't ...
-1
votes
1
answer
41
views
Correct re-use of context.WithTimeout in golang?
First the code I have:
for last < end {
// HERE the linter is complaining with:
// nested context in loop (fatcontext)
ctx, cancel = context.WithTimeout(...
-1
votes
2
answers
47
views
Go Viper config file not found when running in Docker
I'm encountering an issue with my Go application using the Viper library to load configuration files when running it inside a Docker container. My project structure looks like this:
/ratelimiter/cmd/...
0
votes
1
answer
69
views
Deferring free on a parameter
I am working with cgo, I have a parameter that's being passed in as a *C.char. Once it's been used in a function call I no longer need it, so I defer freeing it, but when I do I don't get a result ...
1
vote
0
answers
38
views
Snowflake error: 262000 (08006): failed to get a chunk of result sets — What does it mean?
I'm encountering the following error when querying Snowflake using the Go client (github.com/snowflakedb/gosnowflake):
262000 (08006): failed to get a chunk of result sets. idx: 0
This seems to be ...
1
vote
2
answers
62
views
I cannot query document using ObjectID
When I try to query to collection using ObjectID, I got no documents.
objID, err := primitive.ObjectIDFromHex("6812a288d8169501c71c69b2")
if err != nil {
return domain.User{}, ...
1
vote
0
answers
29
views
Bluesky XRPC ERROR 400: InvalidToken: Bad token scope
I am trying to get a Bluesky Oauth flow working in my app. Here are the two HTTP handlers I'm using. It successfully passes off to Bluesky, where you select an account and give permission. Then it ...
0
votes
0
answers
50
views
go test takes long time to start running on Google Cloud Build
Context
I have a very simple, bare bones cloudbuild.yaml that:
sets up GOPRIVATE variable so that the CI environment is able to download dependencies
Runs go build
Runs go test:
steps:
- id: "...
0
votes
0
answers
53
views
how to process ordered TCP packets concurrently in Go without blocking?
I'm developing a client that will receive packets from a server. Basically, I just need to guarantee the order of receipt, but I'm having a small problem with making the processing of these received ...
-5
votes
0
answers
36
views
interface and delegates [closed]
We are working on a small project which utilizes this project
VFido -> https://github.com/bulwarkid/virtual-fido
in this project, when we jump to this file -> https://github.com/bulwarkid/...
-3
votes
1
answer
39
views
use non-persistent to connect and publish [closed]
As the title indicates, I want to use non-persistent to create a connection to RabbitMQ.
I create connection and channel for one request and publish message to RabbitMQ, and I close the connection ...
-8
votes
0
answers
59
views
High TCP connection explosion [closed]
High TCP Connection Count (500k) During Load Testing with Gatling - Connection Pooling Issue
Problem Description
During load testing with Gatling, we're experiencing a sudden spike in TCP connections (...
0
votes
0
answers
69
views
how do you use the retryablehttp.DefaultBackoff in go? [closed]
using this: https://pkg.go.dev/github.com/hashicorp/go-retryablehttp?utm_source=godoc#DefaultBackoff
I thought it might be something like:
client := retryablehttp.NewClient()
client.Backoff = func(...
0
votes
1
answer
48
views
F-Keys in Windows don't result in update in bubbletea
While used to C# /.Net, I am quite new to go and bubbletea and I am trying to do a little cli helper for my private amusement.
Now, what I am trying to do is bind F2 Key to an update action in ...