Installing and using the Go language and tools associated with it (like the go command). Programming in Go itself is off-topic.
Questions tagged [golang]
24 questions
4
votes
1 answer
How to properly set Environment variables (golang on Manjaro)
I have a problem with my go installation. I'm using Manjaro and I think it is related to this as Manjaro seems to handle the go env differently then suggestest by ubuntu and windows.
I have go installed and can run code as expected:
$ go run…
The Fool
- 155
- 1
- 1
- 8
3
votes
1 answer
How to run `go run` against inline code
I have this mini bash script
#!/usr/bin/env bash
go run <(cat <
Alexander Mills
- 9,330
- 19
- 95
- 180
2
votes
1 answer
Crosscompile go(lang) app with docker for alpine linux (musl) aarch64 with native libs so CGO enabled
Background
I'm writing an open-source GTK go app subsonic API client which:
targets on first place mobile friendly Linux like postmarketOS (alpine linux), Mobian (debian)
in future will be also extended to desktop Linux, Windows and Mac OS but not…
BigB
- 21
- 2
2
votes
1 answer
Rename and add to $PATH
I know that I can add a path to the $PATH on the bash terminal with the command PATH=$PATH:foo .
I also know I can create an alias for the bash with the command alias a=b
But only know I noticed that an alias for the bash is not a global alias and…
Spyros Mourelatos
- 175
- 9
1
vote
1 answer
gmail sendgmail configuration for git send-email
From May 30, 2022:
Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
This is a problem for various applications including git send-email.…
pevik
- 1,397
- 15
- 27
1
vote
0 answers
Unable to install Bazel using Bazelisk
I want to install Bazel on linux 20.04 version. I have already installed go.
I am trying to use the command go install github.com/bazelbuild/bazelisk@latest mentioned in here.
Somehow I am unable to locate where the bazel file is installed.
After…
A J
- 11
- 1
1
vote
0 answers
How to animate progress without overwriting other output?
Let's say I'm writing a program in Go that runs for a period of time while using ANSI control codes to animate a progress indicator line. For example,
outer:
for {
select {
case <-ticker:
fmt.Printf("\033[%dF\033[J",…
Sean
- 11
- 1
1
vote
0 answers
--enable-languages unrecognized option for configure
I am trying to do a build of gcc11 (on RHEL 7.6 which comes with 4.8.5 and no root access). When I run the following:
./configure --prefix=$HOME/gnu --enable-languages=c,c++
I get the response
configure: WARNING: unrecognized options:…
LaptopProfile
- 41
- 6
1
vote
1 answer
go command not working if I switch to super user in zsh shell
go command not working if I switch to super user in zsh shell ..i even updated the zshrc file ...anyone who knows solution to problem please explain in detail..I'm new to linux
Durai Murugan
- 9
- 2
0
votes
0 answers
Where is my Oras build located?
I am trying to install oras
I run
make build-linux-amd64
and
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -v --ldflags="-w -X oras.land/oras/internal/version.GitCommit=60eec263c4db4566b097172652045b85806452c3 -X…
mishav
- 103
- 3
0
votes
0 answers
Bluetooth hci0 not working for Golang application in container but hcitool scan works
I have built a Go Bluetooth low-energy application that can read data from Xiaomi Mi Flora sensors, and it's working great. Now I wanted to containerize it, but I'm failing. From within the container, I can trigger Bluetooth scans with
hcitool…
newduino
- 1
0
votes
0 answers
Is it possible to change the file permission of itself
I created a binary file with Go Language. The owner of the file will be "userA" and the execution permission is set as "userA". The above configurations is enabled using the following commands
sudo chown userA:userA ./program
sudo chmod a+s…
sabby
- 1
- 1
0
votes
1 answer
Not able to install golang migrate on ubuntu 22.04
curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 …
Ubaid Aadil
- 11
- 1
0
votes
1 answer
How to fix error Code bin root/go/bin not a valid identifier?
Trying to install chainlink on my laptop I had to install go. Doing so i think i have done something wrong and now i having error message each time I open ubuntu terminal which contents the following:
-bash: export:…
Leo
- 101
- 1
0
votes
0 answers
Golang Binary PPA Distribution Run As Service
I have a golang application that needs to run as a service on Ubuntu.
My users are not developers so I need to make this process as turn-key as possible. I was thinking the best way would be to package the binary into a PPA and then my users could…