20 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
166
views
Obtaining minimum required go version of remote go module
Is there a way to obtain minimum required go version of remote go module?
I ran into a problem when updated all required modules to latest version that some of modules requires upper go version than ...
0
votes
1
answer
332
views
Go install error: ambiguous import: found github.com/hashicorp/consul/api in multiple modules
I'm trying to install Levant but I'm getting the error:
go install github.com/hashicorp/levant
build github.com/hashicorp/levant: cannot load github.com/hashicorp/consul/api: ambiguous import: found ...
loki's user avatar
- 1,175
1
vote
1
answer
841
views
how to `go install` from gitea
I'm trying to install a package from a self-hosted gitea instance. I'm trying to get a package running go install gitea.urkob.com/urko/go-root-dir but I'm getting this error
no required module ...
1
vote
2
answers
7k
views
Update go using go install
How can the existing version of go be updated using the go install command?
I've done the following
$ go install golang.org/dl/go1.19.4@latest
go: downloading golang.org/dl v0.0.0-20221207214018-...
0
votes
2
answers
7k
views
Why doesn't `go env` command reflect change in environment variable?
In my system, GOBIN variable was unset (empty value). Now unlike some other GO env variables, this seems unset even in the output for go env command. (I'm user ubuntu, so ~ is /home/ubuntu/)
echo $...
0
votes
1
answer
826
views
Can 'go install' be made to work for executables with different names from the git repo?
Go has a nice feature where you can go install <x> and it will download, build and install a binary.
For example, on my local windows PC, go install github.com/goreleaser/goreleaser will find ...
1
vote
1
answer
2k
views
Force `go get` and `go install` to use cache even if it's ancient
Is there a flag for go get or go install to force those to use the cache, even if the cache is very old / ancient? We are using docker images / multi-stage build to cache deps, and those original ...
2
votes
3
answers
2k
views
go get installation from a local fork
I am trying to install a go package from a local directory (basically I checked out and existing package and applied a pending pull request).
$ # Both commands give a similar output
$ go get -u file:/...
1
vote
2
answers
5k
views
Compiling CGO files in Golang package
I am trying to use CGO to bundle C files with a Golang package. Following instructions here:
https://karthikkaranth.me/blog/calling-c-code-from-go/
http://akrennmair.github.io/golang-cgo-slides/#1
...
1
vote
1
answer
421
views
Including pkg in .dockerignore file
Right now my .dockerignore file has this contents:
.vscode
.idea
.git
bin
pkg
and my Dockerfile looks like:
FROM golang:latest
RUN mkdir -p /app
WORKDIR /app
COPY . .
ENV GOPATH /app
RUN go install ...
1
vote
1
answer
4k
views
$GOPATH is set but go install does not work
I am trying to understand the go environment, but I can't seem to go install any package I git cloned locally. go install on the hello world example works fine.
~GOPATH/src/go-github(master ✔) go ...
0
votes
1
answer
112
views
Go install. Execute custom action
I have a CLI Go application. This application is reading some environment variables, and reading a custom config file.
And I don't want this env-variable to be set manually or the config file to be ...
0
votes
1
answer
145
views
How to install web app with all the internal folders, which is built on golang
How to use 'go install' or any other command to install/deploy a web-app with the internal folders.
I had built a small web-app with the following folder structure.
SampleWebApp
|--- swa.go
|---...
74
votes
8
answers
78k
views
Golang equivalent of npm install -g
If I had a compiled Golang program that I wanted to install such that I could run it with a bash command from anywhere on my computer, how would I do that? For example, in nodejs
npm install -g ...
10
votes
1
answer
10k
views
Why Go Programs need runtime support
It's said that Golang is the compiled language, but what does it mean by compiled? If golang application is compiled to machine code, why can't I just distribute the binary (of course on corresponding ...