74,471 questions
0
votes
1
answer
43
views
Why does `.WithInitScripts` not run my SQL files?
Description
I am using a test Postgres container (from testcontainers) for more accurate integration tests. To prevent repeating code, I want to use my existing SQL migration files to setup the ...
0
votes
0
answers
23
views
How to scrape using Go Colly when response is JSON
I'm trying to scrape a site using Go Colly in conjunction with Decodo's advanced scraping API (to handle things like needing a headless browser for JS rendering). The API requires a POST request, ...
Tooling
0
votes
1
replies
35
views
Matching compression libraries between GO and NPM
For context:
I have 2 projects of next.js and go respectively, previously I had a logic to compress some data in next.js backend (getServerSideProps) then send this data to next.js client side and ...
-4
votes
0
answers
70
views
How to config debugger in Goland
When I use "Step Into" in the debugger, it jumps into functions/types from outside my project (stdlib, vendor, etc.). How can I configure the debugger to step only into my own code?
That's ...
Advice
0
votes
0
replies
52
views
How to Delete an IP from a Cloudflare IP list in Go?
How do you delete a single item from an IP list in Cloudflare using Go?
Cloudflare has a feature where it stores lists of IPs, hostnames, or ASNs to be used in formulas. The web UI for this is in ...
1
vote
0
answers
73
views
DB query execution hanging in golang
I don’t understand why this is happening. I’m using the Go database package to connect to a PostgreSQL database. I loop through fullmsg (88 messages), but after processing about 27 messages, ...
-2
votes
0
answers
59
views
minio signature does not match golang api [closed]
I encountered a SignatureDoesNotMatch issue when switching MinIO from Docker Run to Docker Compose. I'm using PresignedUploadURLs to upload files from the frontend (React/Axios).
I've tried all the ...
Tooling
0
votes
2
replies
75
views
How to use a go package (SDK) locally in another project without pushing it to git for faster development
I am working on two Go projects at the same time, let's call the first one myApp and the second one my-sdk , both are seperate Golang projects. Both myApp and my-sdk are under development at the same ...
Advice
0
votes
1
replies
56
views
If an expression in a return modifies an earlier result parameter, does the Go language spec guarantee the new value will be returned?
For example, does the Go language spec guarantee the following will print true?
https://go.dev/play/p/Rybua4uBb87
package main
import "fmt"
func main() {
fmt.Println(...
-1
votes
0
answers
26
views
Having trouble understanding folders and imports for versioned modules with version number >= 2 in golang [duplicate]
I'm having problems with versioning my modules
I have a project with module github.ext.myorg.com/aws-golang.
The new version of the my module is v4. However the running go mod tidy will always add the ...
1
vote
0
answers
34
views
Beego ORM `rel(fk)` field causes panic in `getColumnTyp()` when running RunSyncdb
I am trying to define a foreign key field in a Beego ORM model, but the application crashes during RunSyncdb with the following panic:
panic: runtime error: invalid memory address or nil pointer ...
0
votes
0
answers
56
views
Unable to upgrade knative/client from 0.42 to 0.47. invalid version: unknown revision 000000000000
I am using knative.dev/client v0.42.0 and I am trying to upgrade it to 0.47.0. I am using also:
knative.dev/networking v0.0.0-20251103014656-7d4a19889854
knative.dev/pkg v0.0.0-20251104154049-...
1
vote
0
answers
18
views
Ginkgo Receive(BeEquivalentTo()) fails when comparing struct with interface payload
When writing Ginkgo unit tests, I ran into an issue asserting data received from a channel that contains a struct with an interface{} field.
Here's my models.go
type WsBaseMsg struct {
Type ...
Best practices
0
votes
2
replies
81
views
What is the best practices to delete outdated data from the SQLite database on the server?
I have a Golang server (pet project) and each second I add 2879 bytes of data in database. At the moment I'm about a 1GB of data. I want to cleanup the database to avoid a moment when I'm run out of ...
1
vote
1
answer
112
views
Go database/sql + godror: no error returned on Oracle ORA-56735 timeout from long-running query
Environment: Go 1.24.6, github.com/godror/godror v0.49.0, Oracle DB using database/sql DB.QueryContext (no explicit context timeout).
Problem:
I’m running a long-running query via database/sql with ...
0
votes
1
answer
45
views
gorazor: Can't find layout
For go i want to use the gorazor template engine.
I used code from gorazor repository and from go template benchmark and ran gorazor tpl tpl and got panic: Can't find layout: rzrexmpl/tpl/layout/base [...
2
votes
0
answers
45
views
missing EventToken.h while building with webview and fyne-cross
So, after I added webview onto my app I try to compile my app, this error appears:
In file included from webview.cc:1: In file included from
/go/pkg/mod/github.com/webview/[email protected]...
1
vote
0
answers
83
views
Golang benchmarks involving goroutines show higher than expected allocations when controlling the timer manually
Using go version go1.25.3 darwin/arm64.
The below implementation is a simplified version of the actual implementation.
type WaitObject struct{ c chan struct{} }
func StartNewTestObject(d time....
5
votes
1
answer
105
views
Use Petsc-Library in Go
I am trying to use the PETSc (Portable, Extensible Toolkit for Scientific Computation) library in Go over cgo. After the call of PetscInitialize, the program will crash at a random point with the ...
Best practices
2
votes
5
replies
119
views
Memory accounting and quotas for subtasks in golang programs
If I have a server written in golang that processes requests containing user queries, is there any viable method to track and limit the memory used by any given user request?
The server process does ...
-2
votes
1
answer
98
views
Goroutine not updating map correctly in concurrent Go program
I’m trying to update a map from multiple goroutines, but the results seem inconsistent. Sometimes keys are missing or values are wrong.
Here’s my code:
package main
import (
"fmt"
&...
0
votes
0
answers
84
views
Druid Timestamp formatting issue — data correct, but still shows UTC (Z)
I have a Druid SQL query that returns data correctly for different timezones (UTC, EST), but the timestamp format is still shown in UTC (Z), even though the values are correct.
timestamp ...
0
votes
0
answers
55
views
Install Wails v2 on mac permission denied
I have an issue trying to install WAILS https://wails.io/docs/gettingstarted/installation
I am running a command and it outputs permission denied.
go install github.com/wailsapp/wails/v2/cmd/wails@...
1
vote
0
answers
46
views
how to manage the lifecycle of a gdk.Pixbuf?
I am dipping my feet into gtk/gdk and golang. I have wirtten a Program creating an image per second by providing a new pixmap to the Image widget via
var theImage *gtk.Image
var nextFrame *gdk.Pixbuf
....
1
vote
1
answer
222
views
How to cache downloaded go dependencies in a containerized custom script execution?
One of my build steps is a custom script:
bash test/test.sh
The script itself sits in the source code and launches the testing:
cd test && go test github.com/geniot/blaze-test/src -json
I ...