Vendoring refers to placing Go packages within a "vendor" directory in the project root.
Questions tagged [vendoring]
14 questions
5
votes
1 answer
Managing custom Go modules accessed via non-standard ports
Background
At my company, we use Bit Bucket to host our git repos. All traffic to the server flows through a custom, non-standard port. Cloning from our repos looks something like git clone ssh://git@stash.company.com:9999/repo/path/name.git.
The…

William Hicklin
- 97
- 4
3
votes
2 answers
Vendored Chaincode has false dependencies
I have chaincode with the following directory structure
$GOPATH/myproject/chaincode/mycc/go
├── mycc.go
├── chaincode
│ └── chaincode.go
└── vendor
├── github.com
├── ...
Because of my usage of hyperledgers cid package, I use vendoring…

Roper
- 903
- 1
- 9
- 17
3
votes
0 answers
Deploy Google Cloud Function using Go modules and vendoring at the same time
I am trying to deploy a Google Cloud Function in Go, but got an error while deploying because I use, at the same time, subpackages and "internal modules" (only defined on my host, not deployed anywhere). I have the following structure :
.
├──…

norbjd
- 10,166
- 4
- 45
- 80
2
votes
2 answers
Why does `go list -mod=readonly -m all` require access to private repos?
I'm trying to print a list of direct dependencies in a Go project that has a vendor directory with:
go list -mod=readonly -m -f '{{ if not .Indirect }}{{ .Path }}{{ end }}' all
As I understand, I have to use -mod=readonly because go list refuses to…

tompreston
- 630
- 7
- 24
2
votes
1 answer
How to build project whose dependencies depend on another version of a project dependency
Imagine you have a project which requires two modules A and B. I will call the project module P. Let's say that P requires A v1.0.0, B v1.1.0 and that A requires B v1.0.0. Furthermore B did not adhered semantic versioning rules thus the version…

Sebi2020
- 1,966
- 1
- 23
- 40
1
vote
0 answers
Replacing Dockerfile registry references in Go vendor directory
I've got a Go project that contains several vendored directories that (in some cases) contain Dockerfiles that reference docker.io registries.
This worked well, until security compliance scans and new corporate requirements banned third party…

1001001
- 19
- 1
1
vote
0 answers
Best practices to build vendored code with CMake
I'm trying to understand what some of the best practices are when using modern CMake (3.13+) with respect to building and including vendored or submoduled code.
Say I'm building a library MyLib. My file structure is something like…

Ipiano
- 234
- 1
- 8
1
vote
1 answer
Google Cloud Function using internal private function
Project looks something like this
project
- internal
- package
code.go
- cmd
- function
main.go
In cmd/function, the go.mod looks like this:
module github.com/private/repo/cmd/function
go 1.13
require (
…

lobbin
- 127
- 1
- 12
1
vote
0 answers
Ignore and prevent vendored package from being delete with go dep?
I have a bit of an issue, I have a Go project that I depend on (DPkg) and this project has some small dependency on another package (TPkg).
For some reasons which is irrelevant to the question I am not able to build TPkg at the moment however I know…

Alexandre Thenorio
- 2,288
- 3
- 31
- 50
1
vote
0 answers
How do I vendor a package which itself vendors another package?
I am trying to write an application that uses this package. I have the following snippet:
import (
"github.com/ChimeraCoder/anaconda"
"github.com/garyburd/go-oauth/oauth"
)
c, _, err := anaconda.GetCredentials(&oauth.Credentials{},…

Nathan Osman
- 71,149
- 71
- 256
- 361
0
votes
1 answer
How do I update golang standard library in my go application?
I have an application that was built with go 1.16.4, which uses (imports) the archive/zip component of the Go std lib. I took a look at the golang Release Notes and see that a security vulnerability has been fixed in archive/zip in golang 1.16.5.…

the_endian
- 2,259
- 1
- 24
- 49
0
votes
1 answer
Is vendoring a standard approach or is it obsolete?
I'm about to setup a new project in Go. I came across the term vendoring. Is this standard or an obsolete concept. I'm coming from a nodejs world and this feels like copying the nod_modules folder to a separate directory or am I confusing the…

pandith padaya
- 1,643
- 1
- 10
- 20
0
votes
1 answer
Vendoring package which resides in another project's vendor folder
I'm writing a library package which depends on certain imports but I'm not sure how to handle it correctly.
Let me start with the directory structure:
go/src/github.com/
├── developer A/
│ ├── project 1
│ └── project 2
│
└── developer B/
…

Gilrich
- 305
- 3
- 13
0
votes
1 answer
Why does AWS elastic beanstalk fail to build my app?
I have an app written in Go, which I attempted to deploy to EB.
When trying to access it, I get an Error 502 from nginx, presumably because the app is not running.
Looking at logs, I get a lot of errors like
14:01:29 build.1 | application.go:10:2:…

timedt
- 1,302
- 2
- 9
- 14