Questions tagged [go-get]

Go-get downloads the packages named by the import paths, along with their dependencies. It then installs the named packages, like 'go install'.

80 questions
1
vote
1 answer

go container build (arm) with CGO timeout with net/http: TLS handshake timeout

I have a project using go mod and CGO that has a relatively large dependency tree. Building natively (GOOS=linux, GOARCH=amd64) works fine. Building in a CI (on my own runner) using my custom build container (several architectures, including arm)…
ppenguin
  • 155
  • 1
  • 11
1
vote
1 answer

go: github.com/myorg/myrepo@v0.0.4: reading github.com/myorg/myrepo/go.mod at revision v0.0.4: unknown revision v0.0.4

go: github.com/myorg/myrepo@v0.0.4: reading github.com/myorg/myrepo/go.mod at revision v0.0.4: unknown revision v0.0.4 I'm hitting the above blocker when go mod tidy inside a different private repo call it: github.com/myorg/myrepo2 and attempting to…
j-diaz
  • 11
  • 2
1
vote
1 answer

go build fails to find local dependencies on docker

I'm trying to create a dockerfile for my go server but it keeps failing as it does not recognize some local dependencies (they are modules on the code itself, not external dependencies). example: import ( …
Juan
  • 117
  • 15
1
vote
3 answers

How to run pkg.go.dev locally as a godoc replacement?

godoc has been removed from the go standard install since 1.12 and looks like it wont be updated anytime soon. pkg.go.dev at least appears to be its successor. It also has additional documentation features like grabbing the README.md file and…
Liam Kelly
  • 3,524
  • 1
  • 17
  • 41
1
vote
3 answers

the git.config of setting url doesn't work

I met a weird bugs. For somereason, I need to get a library from ssh, instead of https:// And I think I set up the .gitconfig correct. Here is my .gitconfig: [user] name = nickName email = email@email.com [difftool "sourcetree"] cmd = ''…
LiLian
  • 289
  • 2
  • 14
1
vote
1 answer

Why do I keep getting this message when I try to download a go package?

C:\Users\Administrator\Documents\code\projects\weatherly>go get -u github.com/gofiber/fiber/v2 cannot find package "github.com/gofiber/fiber/v2" in any of: c:\go\src\github.com\gofiber\fiber\v2 (from $GOROOT) …
1
vote
1 answer

git credential.helper instead of .netrc to get go dependencies

To cashing go dependencies I use nexus(as goproxy) which connect to goproxy servers (because nexus can't get dependencies directly from GitHub) outside of private network. nexus.some.repo.com:4443/repository/go-nexus-proxy ➡️…
kozmo
  • 4,024
  • 3
  • 30
  • 48
1
vote
1 answer

go.mod use modules without tags

I use gin-gonic for my rest API. I have a problem with it. The latest tag is v1.6.3 but in master branch there is a method that I want to use. What do I put in the go.mod to use the master branch instead the latest tag? Note: the method I want to…
Yovi Prasetyo
  • 202
  • 1
  • 3
  • 14
1
vote
2 answers

Why cannot import library from go get?

I downloaded go-redis client using go mod init github.com/my/repo go get github.com/go-redis/redis/v8 But it showed cannot find package "go.opentelemetry.io/otel/api/trace". So I deleted go-redis from ${GOPATH}/src/github.com and then tried running…
Kshitij Dhakal
  • 816
  • 12
  • 24
1
vote
0 answers

go-get cannot download from github

I installed a go and I think it is correct. $go version go version go1.15.2 darwin/amd64 $GO111MODULE=on go get -d github.com/XXX@v0.XXX when I downloaded a gihub repo using go, it showed error: go: downloading github.com/XXX/XXX v0.XXX go get…
user389955
  • 9,605
  • 14
  • 56
  • 98
1
vote
2 answers

Can Golang modules be used on a branch other than master?

This code works as long as I'm on the master branch: main.go: package main import ( datemodlocal "192.168.0.12/gitrepo/go-module-test-dateutil.git" stringmodlocal "192.168.0.12/gitrepo/go-module-test-stringutil.git" "fmt" …
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
1
vote
1 answer

go get can't work with a non-routeable IP address

I have a git repo setup on a computer on my local network (192.168.0.12). It has an entry in /etc/hosts 192.168.0.12 ubuntu-18-extssd go get doesn't recognize my hostname (ubuntu-18-extssd) as a host name so I use the IP address instead. Now…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
1
vote
1 answer

go get -u creates a go.mod that fails

Following this example of using go-micro. When I do a go mod init github.com/username/blahblah followed by a go get -u I get this in my go.mod file: require ( github.com/coreos/etcd v3.3.21+incompatible // indirect …
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
1
vote
1 answer

Why is go-get trying to download local code from a remote location?

I recently added a new package and directory to my Go project, and now when I try to build it, I get errors about a password error on Gitlab. I am not importing a new remote package, I am simply adding a new directory underneath my already declared…
Mantas Vidutis
  • 16,376
  • 20
  • 76
  • 92
0
votes
0 answers

Is `go get` recursive? Aka: Are git submodules taken care of when installing a dependency from a git repository

If I install a go dependency from a git repository and this git repository has git submodules, are there taken care of when installing the dependency with go get? I couldn't find an answer skimming and ctrl-f'ing golang/go/../cmd/go/../get.go).…
tenxsoydev
  • 370
  • 2
  • 10