74,487 questions
Tooling
0
votes
0
replies
47
views
Key-Value to store different types of values
So, I am implementing a Block Storage Engine in Go and go stuck at the Database part to store Manifest (file) information and an Index Table (a map to store each block information). I was thinking of ...
1
vote
1
answer
53
views
How to make generics work with interfaces and pointer receivers
I'm trying to use a generic function to make a value, conforming to a specified interface. It won't compile because one of the methods takes a pointer receiver.
Code:
package main
// implyType is one ...
Advice
1
vote
2
replies
73
views
Advices and feeedback on software projects for students
So, I am a CE student and was wondering about the weight of personal projects on portfolio. I recently started developing a Block Storage Engine after learning about it in AWS EBS. Is this a good ...
Best practices
0
votes
2
replies
134
views
What is the best way to the sync.Once.Do() in Go?
I am coding a server in GoLang that allows multiple clients to connect to it and each time a client sends a message to the server that message is propagated to all of the other clients. I came up with ...
0
votes
1
answer
62
views
Golang x509.VerifyOptions CertificatePolicies are not validated during certificate verification?
In Go 1.24.0 there is an additional parameter in x509.VerifyOptions to be included when verifying X.509 certificate. The problem is that if my X.509 ceritificate doesn't contain any policies or ...
Best practices
0
votes
3
replies
71
views
Go generics where value is comparable and pointer-to-value has methods
I have a generic struct that requires passing a generic type that fulfills the constraints where the value is comparable so I can use it in a map index, and the value implements Scanner, ie. type ...
-1
votes
0
answers
60
views
PAX headers on tar.gz archives do not store access time on Windows
I have a utility written in go that creates a tar.gz archive. It preserves file times inside the PAX headers while creating the archive. The file times I am explicitly adding to PAX headers are: atime ...
Tooling
0
votes
3
replies
112
views
How do I delete a slice element
I'm in the process of learning Golang, and I'm currently trying to create a Todo project.
My knowledge is limited to the GO base.
Please take a look at my code and tell me how I can delete a task.
The ...
Best practices
0
votes
4
replies
207
views
Programmer owns the architecture, AI implements crate-level modules in Rust — how does this compare to other languages?
After working on several Rust projects with AI assistance, I want to share a division of responsibility that has worked well in practice, and ask whether others have found the same — or a better ...
3
votes
0
answers
52
views
go/ast, insertion in file.Decls produces invalid code because of comment
I want to create a new struct embedding original struct. But if original struct has comment, it gets placed in the middle of embed struct declaration.
Example code:
https://go.dev/play/p/8xqxpmNy2Qj
...
-1
votes
0
answers
42
views
Prisma client not generated during Go build in deployment environment (Choreo)
I am building a Go backend using Prisma (prisma-client-go)
Locally, everything works fine because I run the following command manually:
PRISMA_CLIENT_GO_BINARIES_ALL=true go run
github.com/steebchen/...
1
vote
1
answer
96
views
How do I order documentation for package declarations in go
Given a package layout as follows:
.
└── pkg
└── pkg1
├── a.go
├── b.go
└── pkg1.go
It's possible to write documentation for the package declaration that appears in the ...
2
votes
1
answer
152
views
Why does adding fmt.Printf change the equality result of two interface variables holding empty structs in Go? [duplicate]
I'm observing a strange behavior in Go where the presence of a fmt.Printf statement affects the boolean result of an interface comparison.
Env:
go version go1.25.6 darwin/amd64
package main
import &...
0
votes
2
answers
117
views
Forcing Go to not use the gold linker
I'm trying to build a Go package in Flathub's CI for an aarch64 Linux architecture. The build is failing while compiling a C dependency:
# github.com/rclone/rclone
/usr/lib/sdk/golang/pkg/tool/...
0
votes
0
answers
178
views
Delve debug go app in docker container with network_mode host
I want to debug my go code which is mounted into a docker container. Delve is installed inside the container.
I am using goland by jetbrains.
Everything works fine as long as I don't use the container ...