go-modules Questions
2
Solved
When trying to lookup some modules, I am having an issue from VS Code where the error pictured below indicates that my GOPROXY is set to off, but when I run go env, I see that GOPROXY is actually s...
Languish asked 7/2, 2022 at 17:53
6
Solved
I'm trying to add a new package to my project with go modules. This package is using github.com/docker/docker/client and works fine outside of the project. When I run go mod vendor it pulls docker ...
Lapp asked 30/8, 2019 at 8:4
2
Solved
The documentation says,
The go mod vendor command constructs a directory named vendor in the
main module's root directory that contains copies of all packages
needed to support builds and tests of...
Plaice asked 27/7, 2021 at 12:14
2
I have this problem:
Module A imports module X v0.1.0
Module B imports module X v0.2.0
I import both A and B in my project.
Golang picks out X v0.2.0 and calls it good. But it is not good. v0.1 a...
Agricola asked 4/8, 2020 at 20:40
2
Is it just me or is working with unpublished go modules insanely painful?
https://go.dev/doc/modules/managing-dependencies#tmp_9
https://groups.google.com/g/golang-nuts/c/9MfGXLmRu8w/m/D2gm_viYBAAJ...
Archduke asked 9/1, 2022 at 14:53
2
Solved
I'm setting up a new project using Go modules with this tutorial, and then trying to build it.
The module is located in a folder outside of the $GOPATH with the following structure:
example.com
├...
Okhotsk asked 1/7, 2019 at 16:29
3
Solved
I'm new to go modules, and am taking them for a spin in a new project which I'm trying to model after the structure described here
Here is an example of my directory structure:
.
├── cmd
│ └── ...
Spitsbergen asked 2/11, 2018 at 16:32
1
Solved
I'm attempting to install a private repository as a golang module.
After reading the Microsoft blog post. I've attempted to do it locally.
I've updated the local .gitconfig with
[url "[email&#...
Keijo asked 27/8, 2022 at 18:10
2
I'm trying to speed up Docker builds of my Go app. Right now, it's spending maybe 60s just building dependencies (it's a k8s controller, so there are a lot).
One very important constraint: my proj...
Tammy asked 27/3, 2019 at 19:20
3
Solved
We are working with Go modules. I want in a CLI to get the specific version of a module. Is it possible?
If you are curious, the reason is that I want to add the following generate command:
//go:ge...
Af asked 5/12, 2019 at 13:26
2
Solved
When I run go mod tidy a few packages show an error
> go mod tidy
github.com/myrepo/myproj imports
go.k6.io/k6 imports
go.k6.io/k6/cmd imports
github.com/fatih/color loaded from github.com/f...
Merry asked 22/4, 2022 at 18:26
2
I have go.mod file inside root/src/abc. And in root/build-scripts I have a script which does go get. As I am using Go 1.11 I have not used the go path instead the mod file in root/src/abc takes car...
Moppet asked 24/10, 2018 at 21:21
2
Solved
I'm trying to get Go modules working without involving a remote repository.
src is a local directory that contains all my projects, also projects that are written in other languages than Go. For s...
Mustachio asked 3/6, 2020 at 2:48
2
I have modifed an existing github project with dozens of 3rd party imported packages but I kept the basic structure intact, which is like this:
.
├── config
│ ├── config.json
│ └── mysql.sql
├...
Varicolored asked 19/5, 2020 at 10:54
6
Solved
$ go version
1.13.3
I have a folder structure as follows:
GOPATH
+---src
+--- my-api-server
+--- my-auth-server
+--- main.go
+--- my-utils
+--- uuid
+--- uuid.go
my-auth-server uses my-...
Visor asked 20/10, 2019 at 13:49
1
Solved
I've created a go module using this:
go mod init rtws
vim main.go # pasted a bunch of code from an example
go mod tidy
Both of these files import "github.com/gorilla/websocket", so...
Lucerne asked 3/6, 2022 at 16:14
1
Solved
I initialise a go project by running:
go mod init firstgo_app
I confirmed the module was created:
cat go.mod
module firstgo_app
go 1.18
Then I installed a dependency on github.com/gin-gonic/gin ...
Acyclic asked 8/5, 2022 at 17:55
3
Solved
I'd like to keep my go.mod dependencies up to date. With Node.js, I run the npm outdated (and later npm update).
What's the closest for Go mod?
Ideally, I'd see a report of outdated dependencies ...
Swerve asked 26/4, 2019 at 11:25
2
just starting to learn about Go Modules. I have a question on importing local packages inside the same module. The example I am looking at is this repo:
https://github.com/Azure/azure-service-bus-...
Behling asked 21/5, 2020 at 17:18
2
Here is the response
not found: github.com/me/[email protected]: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/ea2baff0eaed39430ee011ad9a011101f13b668d5fcbd9dffdfa1...
Trashy asked 13/4, 2022 at 4:4
4
Solved
I am using go modules in my project. I have shared code in the internal folder.
.
├── README.md
├── internal
│ └── shared
│ ├── request.go
│ └── request_test.go
└── web
├── README.md
└── g...
Topee asked 20/4, 2020 at 17:38
4
Solved
Is there an API to get the module name of a project which uses go 1.11 module system?
so I need to get abc.com/a/m from the module definition module abc.com/a/m in go.mod file.
Standish asked 7/11, 2018 at 3:55
1
Solved
I just tried out the Go 1.18 workspace on an existing project. Consider the following project directory structure:
project-root/
|-- app/
| |-- go.mod
| |-- go.sum
Per documentation, I ran the com...
Picky asked 25/3, 2022 at 1:26
1
What is the different between go mod download and go mod tidy?
When I run go mod tidy, if the import is not found it also downloads it.
Piecework asked 16/3, 2022 at 10:41
1
Solved
When trying to use any instead of interface{} with the Go 1.18 toolchain, you can get the error:
undeclared name: any (requires version go1.18 or later)
Why is that, and how can you solve it? any ...
Hernandes asked 15/3, 2022 at 18:48
© 2022 - 2024 — McMap. All rights reserved.