go-modules

Kubernetes client go couldn't find module

时间秒杀一切 提交于 2021-02-19 02:38:06
问题 I'm trying to connect to my local Kubernetes cluster hosted on minikube , here's the code for the same, now when I do go run minikube.go , it gives me an error saying: ../../../pkg/mod/k8s.io/client-go@v11.0.0+incompatible/kubernetes/scheme/register.go:26:2: module k8s.io/api@latest found (v0.19.0), but does not contain package k8s.io/api/auditregistration/v1alpha1`. Now, I tried to manually install the package using go get then I found out that this package does not exist. How can I make it

Go modules: checksum mismatch

不问归期 提交于 2021-02-18 10:14:40
问题 I recently started using modules in Go, but I frequently encounter issues where everything works fine on one machine, but a checksum mismatch is encountered when building the codebase on another machine. The issue always concerns the same third party dependency (github.com/ericlagergren/decimal): go: verifying github.com/ericlagergren/decimal@v0.0.0-20181231230500-73749d4874d5: checksum mismatch downloaded: h1:HQGCJNlqt1dUs/BhtEKmqWd6LWS+DWYVxi9+Jo4r0jE= go.sum: h1:x4oNpFLLl+8l

Go modules: checksum mismatch

时光毁灭记忆、已成空白 提交于 2021-02-18 10:13:45
问题 I recently started using modules in Go, but I frequently encounter issues where everything works fine on one machine, but a checksum mismatch is encountered when building the codebase on another machine. The issue always concerns the same third party dependency (github.com/ericlagergren/decimal): go: verifying github.com/ericlagergren/decimal@v0.0.0-20181231230500-73749d4874d5: checksum mismatch downloaded: h1:HQGCJNlqt1dUs/BhtEKmqWd6LWS+DWYVxi9+Jo4r0jE= go.sum: h1:x4oNpFLLl+8l

Go modules: checksum mismatch

匆匆过客 提交于 2021-02-18 10:13:32
问题 I recently started using modules in Go, but I frequently encounter issues where everything works fine on one machine, but a checksum mismatch is encountered when building the codebase on another machine. The issue always concerns the same third party dependency (github.com/ericlagergren/decimal): go: verifying github.com/ericlagergren/decimal@v0.0.0-20181231230500-73749d4874d5: checksum mismatch downloaded: h1:HQGCJNlqt1dUs/BhtEKmqWd6LWS+DWYVxi9+Jo4r0jE= go.sum: h1:x4oNpFLLl+8l

How does go know where to get packages from

萝らか妹 提交于 2021-02-17 05:37:49
问题 When I import a package in a go application (using modules and vscode with golang plugin): import ( cors "goa.design/plugins/cors/dsl" ) go automatically retrieves the package. How does go know where to get it from? I figured it simply pulls the sources from github.com, but the repository for this project is at https://github.com/goadesign/goa no . in the name. And if I change the import to: import ( cors "goa.design/plugins/v3/cors/dsl" ) It retrieves the v3 package. I would gladly RTFM, but

How to import private repositories on GAE SE Go 1.11, with go modules?

天涯浪子 提交于 2021-02-10 13:16:35
问题 I have a go library package repository on github as a private repository. And I wrote a project like below that import the library package above. package main import "github.com/foo/libpackage" func main() { : } This is a directory hierarchy. path/to/project |- main.go |- go.mod `- go.sum When deploying I got a error that cannot go: github.com/foo/libpackage@v0.0.0-20181127123728-008fddddc190: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs

How to import private repositories on GAE SE Go 1.11, with go modules?

自作多情 提交于 2021-02-10 13:16:09
问题 I have a go library package repository on github as a private repository. And I wrote a project like below that import the library package above. package main import "github.com/foo/libpackage" func main() { : } This is a directory hierarchy. path/to/project |- main.go |- go.mod `- go.sum When deploying I got a error that cannot go: github.com/foo/libpackage@v0.0.0-20181127123728-008fddddc190: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs

How to import private repositories on GAE SE Go 1.11, with go modules?

爱⌒轻易说出口 提交于 2021-02-10 13:16:07
问题 I have a go library package repository on github as a private repository. And I wrote a project like below that import the library package above. package main import "github.com/foo/libpackage" func main() { : } This is a directory hierarchy. path/to/project |- main.go |- go.mod `- go.sum When deploying I got a error that cannot go: github.com/foo/libpackage@v0.0.0-20181127123728-008fddddc190: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs

How to import a private Go library (as module) within another private Go project (as module)

℡╲_俬逩灬. 提交于 2021-02-08 07:42:59
问题 I am moving a few private Go projects to GitLab while getting rid of Godeps , Go dep with vendor directory and all of that because I would like to use just Go modules. I am using Go version: go1.12.6 linux/amd64 . I have a private "library" project / git repository at gitlab.com/my-company/my-team/my-library . This works as a Go module with go.mod and go.sum . I would like to use my-library as a dependency for another project, this: gitlab.com/my-company/my-team/my-project . The structure of

How can I persist go 1.11 modules in a Docker container?

大城市里の小女人 提交于 2021-02-07 13:16:55
问题 I am migrating a Go 1.10 app to Go 1.11. This also includes migrating from dep to mod for managing dependencies. As the application depends on a database, I am using a docker-compose to set up the local development environment. With Go 1.10 I simply mounted the local repository (including the vendor folder) into the correct location in the container's GOPATH : web: image: golang:1.10 working_dir: /go/src/github.com/me/my-project volumes: - .:/go/src/github.com/me/my-project environment: -