Questions tagged [golang]
28 questions
3
votes
2 answers
How to list of software installed using `go install x@latest` and their version
When I install a Go software with the suggested command, e.g.:
$ go install github.com/walles/moar@latest
it gets installed into $HOME/go/bin and I'm pretty happy with that, much faster than waiting for operating system repositories to get…
lapo
- 423
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
1 answer
How to execute a sudo NOPASSWD: allowed command from a binary executable?
I need a guru hint.
Here is my sudoers file:
myuser ALL=(root) NOPASSWD: /usr/bin/systemctl start my-service
My problem is that when I run
myuser@machine:~$ /usr/bin/sudo -u root /usr/bin/systemctl start my-service
as CLI logged in user, it works…
1
vote
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…
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
1 answer
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
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
- 289
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…
Alexander Klauer
- 131
- 6
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
1 answer
GoMobile tools are not recognised(Golang)
On installing Golang mobile tools on my Windows10-64bit machine,the gomobile tools are not recognised . The installation path is the GOROOT PATH C:\Go.
GoVersion :- go1.11.5 windows/amd64 is installed on my machine.
Please let me know how to get…
srt111
- 203
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
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
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
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
…
being of habits
- 121
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
- 5,318