74,447 questions
Tooling
0
votes
2
replies
65
views
Cache Go dependencies in dev container
I'm trying to build a pre-built dev container (see here). Among others, the app has some Go dependencies specified in go.mod (link to file):
module github.com/jovandeginste/workout-tracker/v2
go 1.24....
2
votes
3
answers
7k
views
Build Constraints restricting fyne import for VS Code on Windows
I have imported the fyne GUI , and now my GoLang compiler that there is an error imported the files because the build constraints.
I have tried cleaning out caches using commands from this post, ...
2
votes
0
answers
32
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
56
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....
2
votes
0
answers
36
views
How to use ITaskbarList3::SetProgressState and ITaskbarList3::SetProgressValue in Go? [duplicate]
I make a software in Go. Because it made a long process, it displays a progression bar. I show one with a *fyne.widget.ProgressBar, and I would like to add another one directly on the taskbar button ...
5
votes
1
answer
90
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 ...
0
votes
1
answer
103
views
How can I have a tools-only folder/module?
My project has the following folder structure:
.
├── mkdotenv
│ ├── core
│ │ ├── dotenv_resolve.go
│ │ └── dotenv_resolve_test.go
│ ├── files
│ │ └── files.go
│ ├── go.mod
│ ├── go....
2
votes
1
answer
46
views
Purpose of WriteCommitted isolation transaction level (Golang database/sql package)
In Golang, database/sql package, there is a constant such as LevelWriteCommitted for the IsolationLevel type
https://pkg.go.dev/database/sql#IsolationLevel
What is the purpose of this level? There is ...
2
votes
1
answer
88
views
Is it possible to retrieve lists of HDF5 file, group, dataset, and attribute in Golang
I'm currently working on developing data reading and writing for HDF5 files in Golang. I've consulted the library documentation and managed to successfully implement writing operations. Now, I need to ...
2
votes
2
answers
1k
views
How do I read an HDF5 attribute which could be one of two different data types, using the GO language?
I am porting an existing C++ application to GO as part of an evaluation project. As part of this I need to read two Dataset attributes which in some files are stored as a double and in some as a float....
60
votes
11
answers
17k
views
What's the appropriate Go shebang line?
I like using shebangs to run my Perl scripts directly:
#!/usr/bin/env perl
What's the shebang for Go programs?
1
vote
1
answer
62
views
How to display a progression bar on the task bar using Go and Fyne?
I am creating a little software in Golang. I use Fyne as GUI library. It creates long process (it it a file encrypter), so I display a progression bar, as it:
go func() {
go encryptCore(
...
4
votes
2
answers
765
views
gomobile bind: missing methods with struct and interface parameters
I have the following go code:
package hello
import (
"TestGoMobile/model"
"fmt"
)
func Test(string) int {
return 0
}
func Greetings(test model.Test) string {
...
Best practices
0
votes
2
replies
98
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 ...
0
votes
1
answer
88
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 ...