Skip to main content
17,689 questions with no upvoted or accepted answers
41 votes
2 answers
4k views

AWS Cognito's SMS Multi Factor Authentication returns invalid code or auth state

I am trying to implement authentication built on Cognito using their Go SDK. I have been able to get basic username/password authentication to work, but when I add in 2-factor authentication using SMS ...
Ben's user avatar
  • 1,871
14 votes
0 answers
5k views

Simplifying AWS SDK GO v2 testing/mocking

Amazon has a super useful article describing how to unit test AWS SDK Go v2. I understand their motivation to depart from the "old" way of unit testing the v1 API, which I think aligns with ...
Tim Reddy's user avatar
  • 4,420
14 votes
3 answers
20k views

How to interpret pprof output?

I'm trying to profile an application written in go which apparently uses about 256 virtual memory (checked using ps aux). I'm trying to use pprof package and see what functions allocate/consume most ...
Anthony Hunt's user avatar
  • 1,600
14 votes
1 answer
3k views

Using go.dbus with omxplayer on Raspberry Pi

I am trying to using the D-Bus interface on omxplayer in order to control the running video. I'm attempting this using the go.dbus library found here: https://github.com/guelfey/go.dbus The ...
Majormjr's user avatar
  • 203
13 votes
0 answers
8k views

Go autocert acme/autocert: missing server name

I use library autocert in my application for generating an SSL certificate. The problem is 30% of users have a problem with my application. My current code is: fmt.Println("Starting server on &...
Lorenzo Boniot's user avatar
13 votes
0 answers
657 views

Blobstore upload redirects to wrong module

The Problem When uploading a file using the Go Blobstore API, the success path redirects to the wrong appengine module. Here is a more visual description of the problem: User lands on the upload ...
Jonathan Azoff's user avatar
12 votes
1 answer
2k views

How to set fee in raw bitcoin transaction using btcutil

According to the docs (http://godoc.org/github.com/btcsuite/btcrpcclient) the fee can be set by using SetTxFee(fee btcutil.Amount) // hard coded0.0006 BTC I set the fee to 0.0000016 bitcoin/kilobyte ...
Amidii's user avatar
  • 345
12 votes
2 answers
3k views

How to detect current terminal encoding and convert user input to and from utf8?

I am writing a golang command line program that accepts user input. This input string has to be converted to UTF-8 and sent to another server for processing. On Linux, the terminal encoding is almost ...
man3's user avatar
  • 171
11 votes
0 answers
895 views

Golang: create TCP 3-way handshake using ipv4.NewRawConn

I'm trying to successfully establish a TCP 3-way handshake. I want to be able to control the IP layer, ideally with github.com/google/gopacket. Here's my Go program: package main import ( "...
mirobertod's user avatar
11 votes
0 answers
322 views

SetEvent state from golang to c (cgo)

I wrote DLL to handle my VSCAN communication in golang. I'm facing a really hard problem now. Is there any way to signal state from cgo to c/cpp program? I'm using a large CPP project, inside it calls ...
Frnk Wdl's user avatar
  • 156
11 votes
0 answers
2k views

output '_coverage/_coverage_report.dat' was not created when using bazel coverage to generate lcov coverage file

I am using bazel to manage our golang project and I found an option online that I can generate coverage html file by generating a lcov coverage.dat file first and then use genhtml to generate the html....
P Li's user avatar
  • 5,152
11 votes
2 answers
1k views

App doesn't resolve an internal DNS entry when connecting via Cisco IPSec

I use Cisco IPsec to connect to my workplace VPN. I connect using OS X's native Cisco IPSec client. We have an internal DNS server that holds records for internal sites, such as scotty.infinidat.com. ...
reish's user avatar
  • 841
10 votes
1 answer
1k views

How do I include a wasm file compiled by golang in a chrome extension?

I've tried everything in here: Golang to wasm compilation And I can't get past: WebAssembly.instantiate(buffer, {wasi_snapshot_preview1: ""}) WebAssembly.instantiate(buffer, {go: {debug: &...
Andrew Arrow's user avatar
  • 4,541
10 votes
0 answers
8k views

Getting "Cannot query module due to -mod=vendor(Go version in go.mod is at least 1.14 and vendor directory exists.)" error when executing unit test

I'm new to the Go language. I'm trying to run a unit test using the go test command, but the below error shows up: cannot query module due to -mod=vendor (Go version in go.mod is at least 1.14 ...
JosephZoom94's user avatar
10 votes
0 answers
651 views

Generate DWARF debug info in wasm binary from go?

I'm trying to generate a wasm binary with DWARF debugging info via (non-Tiny) Go. Despite many iterations with the build, gimli/dwarfdump keeps showing empty debug data sections (though it shows non-...
BobHy's user avatar
  • 1,706

15 30 50 per page
1
2 3 4 5
1180