Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
102 views

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" &...
Md.Jewel Mia's user avatar
  • 3,457
0 votes
1 answer
111 views

My project has the following folder structure: . ├── mkdotenv │ ├── core │ │ ├── dotenv_resolve.go │ │ └── dotenv_resolve_test.go │ ├── files │ │ └── files.go │ ├── go.mod │ ├── go....
Dimitrios Desyllas's user avatar
0 votes
0 answers
91 views

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 ...
Vibhu Khare's user avatar
3 votes
2 answers
149 views

I'm encountering an issue in a Go application that uses the official MongoDB Go driver. We have the use case where a ReplicaSet is recreated from scratch. Replica Set consists of 2 members, no arbiter ...
Isaac's user avatar
  • 31
0 votes
0 answers
63 views

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@...
Sebastian Romero Laguna's user avatar
1 vote
1 answer
70 views

I just want to create a simple chat app. I try setting the min size for myWindow but only found SetMinSize function on baseObject, not for container or layout. Right now my app can shrink very small ...
Nguyen Duc's user avatar
1 vote
0 answers
46 views

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 ....
Impatient Hippo's user avatar
1 vote
0 answers
47 views

when I call xml.MarshalIndent() in Golang, it produces XML structures like these: <Screen id="Screen1"> <Label id="Label1" Text="First number: "></Label&...
KUMARASWAMY B.G's user avatar
1 vote
1 answer
224 views

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 ...
Vitaly Sazanovich's user avatar
-1 votes
2 answers
92 views

I want to use gorazor a viewengine written in go that uses razor-Syntax. They provide an example which i tried to understand and adapt. What is working I want to iterate over a slices of movies and ...
surfmuggle's user avatar
  • 6,040
1 vote
1 answer
55 views

i am new to go-lang and i have been using gin, gorm and postgres for backend api and i want to get the data from the model. user model: package models import "gorm.io/gorm" // enum role ...
Dev Patel's user avatar
1 vote
1 answer
80 views

I am attempting to instantiate a client, based on the sample https://github.com/okta/okta-sdk-golang?tab=readme-ov-file#get-an-application. No matter what I do I always get: a 401 Unauthorized Error. ...
user30909924's user avatar
2 votes
1 answer
123 views

I'm currently trying to use json.Unmarshal to convert a json response from server into a type struct. Part of my type struct uses a type from a library (https://pkg.go.dev/github.com/clarkzjw/starlink-...
PikaSannnnn's user avatar
3 votes
0 answers
122 views

I'm trying to send a post request with form data and bind it to a nested slice. Here's a minimal example: type House struct { Rooms []Room `form:"rooms"` } type Room struct { ...
Benjamin's user avatar
  • 533
1 vote
0 answers
65 views

I built an MITM Go proxy to intercept all requests. I’m also developing an enterprise Flutter iOS app that uses a custom in-app trust store (so it doesn’t rely on the OS trust store) and I’ve stored ...
Chandan Kumar Dash's user avatar
0 votes
0 answers
59 views

I have built a app and i want it to auto start after loging in Windows I have tried puting a symbolic link in the windows startup folder but app dosen't autostart. I also have tried using Windows ...
Udan Jayanith's user avatar
-4 votes
1 answer
121 views

I have a package "tools" that expose a method that must execute some logic only one time. The next calls don't do nothing. The file tools/tools.go is like: package tools import ( "...
Santiago Rincon's user avatar
1 vote
1 answer
62 views

I am programming a little software in Go called GoFileEncoder. For the file dialog boxes, I would like to use fyne.io/fyne/v2/dialog. Only, the functions dialog.ShowFileOpen() and dialog.ShowFileSave()...
eliotttak's user avatar
1 vote
1 answer
115 views

I created a custom widget in Fyne that dynamically adds other widgets. Everything works fine — until I hide the parent widget and show it again after a few minutes. When I call .Show() again, all the ...
hamidreza maddah's user avatar
-4 votes
1 answer
120 views

CONTEXT: My goal is to use http.Get(), then use the golang.org/x/net/html package to parse the resp.Body and extract some bits of data from some <div>'s that all use a similar naming scheme for ...
Quercus's user avatar
  • 15
2 votes
2 answers
120 views

After some package upgrade on my Ubuntu 24.04 I stumbled upon inability to build/install/work with almost any of golang packages. So, I'm trying to install staticcheck and get the following error: $ ...
milo's user avatar
  • 1,260
0 votes
0 answers
53 views

I have a Go application the creates a disk encryption set in tenant A, on Azure. It uses an Azure CMK created by the customer in tenant B. I need to know the location of the key. I only have access ...
user219820's user avatar
0 votes
1 answer
97 views

I want to create a generic cache, where entries in the cache have some common metadata properties. // some metadata type CacheMeta struct { SomeMutableValue string } // we want to mutate the ...
John's user avatar
  • 12.1k
3 votes
1 answer
79 views

I am trying to build my own traceroute for education and fun. I am using go programming language for that. My problem is when I am using Windows, reading ICMP packages fails even though I see them on ...
Kagan's user avatar
  • 23
-3 votes
1 answer
97 views

I have a cli app written in go and when it closes I want the directory to move to the selected one. When I close I wasn't able to find any way for that to happen so I tried making a .bat wrapper for ...
Joseph Jitto's user avatar
5 votes
2 answers
2k views

After upgrading to Go 1.25 (specifically 1.25.1) when I run go test -cover I get this message: go: no such tool "covdata" The command exits with status 1. It seems this does not happen ...
blackgreen's user avatar
  • 46.9k
0 votes
1 answer
51 views

I have a problem with using S3 API and Go. To read an object and immediately transfer it to Minio i use Pipes: pr, pw := io.Pipe() For example, I will create an archive object using pipe: zipWriter :=...
TASK's user avatar
  • 345
0 votes
1 answer
118 views

I am writing an e2e test which starts the binary of the program and sends an http.Get() request to the server endpoint. main.go func main() { handler := http.HandlerFunc(func(w http.ResponseWriter,...
Limpskinz's user avatar
2 votes
0 answers
54 views

I was under the impression that given an rpc like below rpc FetchResource(GetResourceRequest) returns (ResourceResponse) { option (google.api.http) = {get: "/v1/resource/{resource_id}/group&...
dat's user avatar
  • 442
1 vote
1 answer
85 views

I've setup my handlers with little to no issue. At the moment I've got an index.html page - which I've defined as "index", and I've got a login.html page - which is just a dummy form. I ...
user avatar
-2 votes
2 answers
95 views

While designing social media application, i want my my users to have unique email and unique username, but the problem is, I am providing an otp verification and my table have coulmn id int primary ...
Ansal's user avatar
  • 1
0 votes
1 answer
66 views

Firstly, the OAuth flow, itself, works. After sign / login I create a session using gorilla/sessions and set the session cookie. Now, since I use cookies as the auth mechanism, I thought it followed ...
Biobele Johnbull's user avatar
1 vote
1 answer
83 views

I've read that Go uses tabs for indentation spaces for alignment and this sounds like a great idea to resolve the tabs-versus-spaces fight and get the benefits that tabs promise without the problems ...
iconoclast's user avatar
1 vote
1 answer
83 views

I'm trying to use gin-contrib/sessions but every time I make a request to the server a new session is created. It is never finding a previously created session and I can't access any data that should ...
Brent Parker's user avatar
1 vote
1 answer
71 views

I'm trying to connect through ssh to a hacking CTF server. I can do it with ssh so can I with python pwn tools but I struggle to do it with go. When I try to create a session, my code complains with ...
wavesinaroom's user avatar
1 vote
2 answers
123 views

I am working on a project in go (which I am not very familiar with), that runs as a systemd process and spawns child processes, but whenever the systemd service is restarted, I see warnings (sometimes ...
thiago's user avatar
  • 450
1 vote
1 answer
84 views

I want to make a VSCode Extension that matchs regex pattern that I define with project's git-logs. I want the best performance, so I am thinking of using Golang as the backend instead of Typescript. I ...
Ryan's user avatar
  • 27
2 votes
2 answers
158 views

I'm writing text into an image and I want this text to be scaled up (like doubled or tripled). import ( "golang.org/x/image/font" "golang.org/x/image/font/basicfont"...
Nil's user avatar
  • 31
0 votes
1 answer
89 views

for{ var name string fmt.Scanln(&name) fmt.Println(name) } When you input "abc 123", you will receive outputs for "abc" and "23" respectively(The first ...
怎么硕呢's user avatar
0 votes
1 answer
63 views

Mixpanel Support is telling me to set the $device_id and $user_id, and let the go SDK decide on the $distinct_id, but all the Mixpanel-Go APIs in the library expect me to provide the distinct_id. So ...
Zorayr's user avatar
  • 25.1k
1 vote
1 answer
194 views

In principle I want to use slog to produce JSON that contains some specific JSON fields (severity,message, and timestamp). I know I can use ReplaceAttr in HandlerOptions to modify the existing log ...
RubenLaguna's user avatar
  • 25.5k
1 vote
2 answers
3k views

When running the go run command (both on GoLand and on the CLI), the error: dyld[60166]: missing LC_UUID load command in /private/var/folders/some/tmp/dir/ was showing up. This was happening with Go ...
muya_'s user avatar
  • 1,116
-4 votes
1 answer
102 views

When I run a GO program, temporary files are detected as a threat by Windows Defender. Example:AppData\Local\Temp\go-link-4058383063\a.out I have changed GOTMPDIR env var and I disabled security on ...
Guix555's user avatar
  • 13
2 votes
1 answer
179 views

I have been struggling with passing an array/slice from Golang to a sqlc (postgres) database query WHERE clause that has an IN operator. There is very little documentation around this function and it ...
Joels Elf's user avatar
  • 814
-3 votes
1 answer
113 views

I created a single producer go routine which emits a value at random interval in an infinite for-loop, similar to this: func producer() <-chan uint64 { out := make(chan uint64) go func() { ...
Akshat Bhargava's user avatar
1 vote
1 answer
115 views

I'm trying to create database users in my Postgres database from Golang, and I can't seem to get queries to run. I'm able to establish a connection, but I cannot run create user X with password Y and ...
Naftuli Kay's user avatar
  • 92.6k
2 votes
3 answers
225 views

I have a process that computes and checks the checksum in AIS messages, the checksum is the xor of all the bytes in the message expressed in hexadecimal format. At the moment I am turning both the ...
Hoodoo's user avatar
  • 125
1 vote
0 answers
36 views

So basically I am trying to read data from kafka and dump it to some destination. Before committing the message to kafka, I commit it towards destination and after successful commit to destination, ...
Duke Dhal's user avatar
1 vote
1 answer
59 views

I have Pact tests for a Go service. One of the consumer pact scenarios sends a GET request with a query parameter uuidToken. The problem is that uuidToken in the database is an immutable field: it’s ...
Maxim Koev's user avatar
0 votes
1 answer
48 views

How to get quick check to generate structs like time.Time? I'm unable to find any information to help me online, it feels like I'm the only one still using testing/quick func Test_QuickCheck_Time(t *...
Yarek T's user avatar
  • 9,965