Questions tagged [golang]

25 questions
3
votes
1 answer

Checking if GO is installed on machine

I'm writing a shell script and I need to pull something from github using the command go get github.com/aktau/github-release, but I first need to make sure that the person calling the script has GO installed on their machine. If they do not have it…
1
vote
0 answers

Getting ignoring symlink error in VSCode

I am new to the Golang and VSCode. In my code, I have golang repo having imports from other directories. So, there is a vendor directory of which I am creating a symbolic link in my repo. But all the imports are giving error and are shown in red,…
1
vote
0 answers

Tool written in Go works fine from terminal (in any directory) but gives "command not found" error when called from inside a script

I wrote a shell script that bundles a few networking tools together (amass, nmap etc) and they all work fine except httprobe (a tool that takes a list of domains and probes for working http and https servers). The tool is written in Go. The Go…
Pink Bug
  • 11
  • 1
1
vote
1 answer

App is in task manager but not visible

I try to open GoLand and it shows up in task manager: But it doesn't show up in taskbar: Also pressing alt + tab doesn't show the app. Looks like the app is running but not visible. Did anybody run into such a problem? Update A clean boot did not…
Megidd
  • 261
  • 3
  • 15
1
vote
2 answers

How to conditionally strip/compress binaries with alternate utilities (i. e. other than strip)

In our yocto-based embedded application, we now have several Golang binaries, which can become very large. For example, docker (from meta-virtualization) and related binaries weigh in with several 100 megabytes if uncompressed. Therefore, we created…
1
vote
1 answer

How to use go modules on nested git packages?

I am trying to use pulsar from golang and i am trying to migrate my project from dep to go modules since some of the newer libraries prefer go modules. When i tried to create a new project and run dep ensure -add…
1
vote
0 answers

opnecv4.pc missing file and gocv

I am trying to make this code to work: package main import ( "gocv.io/x/gocv" ) func main() { webcam, _ := gocv.VideoCaptureDevice(0) window := gocv.NewWindow("Hello") img := gocv.NewMat() for { webcam.Read(&img) …
TomE8
  • 111
  • 1
1
vote
0 answers

How to set https proxy written in Golang system wide?

I have a proxy app written in Golang. For now the proxy requires no authentication. I can deploy it with or without tls certificates. At first I deployed it with tls certs. I tried connecting with foxyproxy addon in firefox and it worked fine. I…
Mohi_k
  • 11
  • 3
1
vote
0 answers

pkg-config windows installation, not able to find libxml-2.0

I am trying to install github.com/terminalstatic/go-xsd-validate for xsd validation and have followed the steps mentioned in the link - https://medium.com/@kumarharsh/using-libxml2-headers-in-windows-5d548077cde5 My pkg-config.exe is in…
simi
  • 11
  • 2
1
vote
0 answers

Go vet command error

Just updated the golang compiler to 1.12.5 version. Everything works just fine, apart from go vet command. It responds with the following error: # runtime/cgo _cgo_export.c:3:10: fatal error: stdlib.h: No such file or directory #include
1
vote
1 answer

go get throws 'fatal error: unexpected signal during runtime execution'

I am trying to build from source of hugo on osx. I have set GOPATH to the the hugo git clone directory. Then go get throws the following error message: > go get …
Anthony Kong
  • 4,868
  • 11
  • 48
  • 80
0
votes
0 answers

How to enable ZabbixAgent2 loadable plugin?

I'm trying to write loadable plugin by this manual. But when I test my plugin I get the message: myip [m|ZBX_NOTSUPPORTED] [Unknown metric myip] I tried to create metric on zabbix-server, but I don't know what Key value to set. Did anybody have…
0
votes
1 answer

When windows service is installed under different user it requires manual "Log On" is this expected?

using golang example I created windows service application, as mentioned in documentation I configured with service user and password. I'm using a batch script that will execute @REM install windows service using that application. app…
0
votes
0 answers

Can `sudo` alone be used to switch to another given a password?

I am currently writing a program in Go and trying to implement a switch user functionality. However, I can't find a clean way of sending a password via stdin to su. sudo -S allows for stdin password input, but as this requires sudo rules to be setup…
clubby789
  • 217
  • 3
  • 10
0
votes
0 answers

Why terminal in Ubuntu 16 cannot find go version even after setting up path?

I followed the below steps to set up a workspace for go in ubuntu 16. 1.Downloaded go 1.14 version for linux from https://golang.org/ 2.Extracted it in the /usr/local using the command- sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz 3.Added…
JSnow
  • 101
  • 1
1
2