74,494 questions
-2
votes
0
answers
19
views
I want to transfer to read my data from Kafka instead of DocumentDB [closed]
currently I am showing the Business Metrics for my data by doing an Aggregate query on DocumentDB which is taking around 15 mins in Prod for around 30M+ Data. My senior recommended me to use Kafka ...
0
votes
0
answers
53
views
Implementing pagination for API results
I am building a web application in Go (using the standard net/http library) that fetches a list of popular films from the TMDB API. Currently, I fetch and display all films at once, but I want to ...
1
vote
1
answer
24
views
How to partially override decoding behavior using Mongo Golang Driver v2
The timeCodec in the Mongo driver throws an error when decoding doubles into time.Time fields. I'm dealing with legacy data that stores time as a double and it's impractical for me to migrate ...
1
vote
1
answer
33
views
How to organize message compression before publishing and decompression when reading on the consumer in the NATS message broker
colleagues!
- I use the "nats" message broker in my Golang project.
- Currently, when using "NATS," large messages aren't compressed at all, causing the producer to crash with an ...
0
votes
0
answers
36
views
How to detect applications that are not visible in screen capture from a Chrome Native Messaging host?
I’m building a Native Messaging Host in Go (Windows/macOS) for an online proctoring app. The Chrome side records the screen, and the native host should detect if apps are running but not visible in ...
Tooling
0
votes
0
replies
23
views
Go server and godot P2P connection with out port forwarding
This days me and my friend made a multiplayer game in godot. The server is written in go using protobaf. To test the multiplayer, i used ngrok. I know we can use port forwarding but i thought ngrok is ...
-2
votes
0
answers
62
views
Why do my goroutines see stale or repeated keys when ranging over a map and modifying it at the same time? [closed]
I’m experimenting with Go’s for range loop and goroutines, and I ran into behavior I can’t explain.
This example prints inconsistent or duplicated values:
package main
import (
"fmt"
...
1
vote
1
answer
55
views
go telnet send string
I need to send commands by telnet to a matrix switcher from Atlona (though, I suppose, it's not a problem with a device, but anyway).
One of commands is x4AVx5.
When I send it from terminal, it works. ...
Tooling
0
votes
3
replies
32
views
lazyvim, golang with goimports: is it possible to use a local config for goimports?
I am working on a module called automat.
When I save my go file, it's being reformatted from:
package cmd
import (
"context"
"fmt"
"os"
"strings"
&...
Best practices
2
votes
4
replies
65
views
Formatting time based on system locale in Go
I want to show the user a timestamp based on their preference, i.e. the system locale. I want to format the time depending on if they're using a time locale that normally shows a 12-hour time, or 24-...
-3
votes
0
answers
37
views
How do I preview a Pdf fike via a presigned S3 URL in React? [duplicate]
I have an api which is responsible for download the file of any mime type if its available in the s3 bucket now in the response it draws a presigned url, hmacsignature, urlbucket name, etc.
Now I want ...
-1
votes
2
answers
93
views
Why does my Go templates always render the last child template when using template inheritance?
I'm having an issue using template inheritance in Go. All of my routes are rendering the same file from my templates folder, which happens to be the last one (ViewGames.html). Here is what my ...
0
votes
0
answers
29
views
RPC commiunications in Mattermsot plugins and Apache-APISIX plugins, Is RPC only for Golang - Golang?
I’m trying to understand how plugin systems differ between Mattermost and Apache APISIX, specifically in how they use RPC for external plugins.
Mattermost plugins must be written in Go. The server ...
1
vote
1
answer
77
views
I can't query by UUID
I'm having trouble querying UUID values stored as BLOB(16) in SQLite3 using Go (with goqu). I insert a UUID using uuid.New().MarshalBinary() and this works correctly. However, when I try to select the ...
1
vote
0
answers
32
views
How to correctly establish connection with active directory via LDAP in Golang
I have been trying to write a daemon in go to run on linux that would periodically do certain actions, and once some conditions are met, it would connect to AD, and write a value to a given record.
...