govendor | - Use Go Modules
kandi X-RAY | govendor Summary
kandi X-RAY | govendor Summary
Use Go Modules.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of govendor
govendor Key Features
govendor Examples and Code Snippets
Community Discussions
Trending Discussions on govendor
QUESTION
I try to use govendor in my project folder /d/projects/go/src/github.com/user/dbot
govendor init
but bash returns
bash: govendor: command not found
for installation I just follow instruction and use
...ANSWER
Answered 2017-Feb-10 at 23:06If all you are doing is:
QUESTION
I created by the commands govendor init
and govendor fetch "github.com/gorilla/mux"
the vendor directory in the project.
However, when performing deploy in gcloud gcloud app deploy
the following error occurs, github.com/gorilla/mux
is not found:
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed: /work_dir/main.go:5:5: can't find import: "github.com/gorilla/mux"
What is missing to make deploy work? My plan is free in gcloud
app.yaml
...ANSWER
Answered 2019-Feb-02 at 07:14If you want to use your vendored version of the mux package, then ensure that the SAMPLE-API files are in a Go workspace.
If vendoring is not required, then delete the vendor directory, run go get github.com/gorilla/mux
and then deploy your app. In this case, your application files do not need to be in a workspace.
In addition to these build related issues, you must register the Gorilla mux with http.DefaultServeMux.
QUESTION
We currently are using govendor
to manage packages in our go
repository. Since we are using a lot of packages, we have decided to check-in the packages sources code into vendor
folder, so that:
- Saving time downloading all packages every time the repository needs to be built in build machines.
- Avoiding the possibility of one package becoming unavailable online (being deleted, network issues, etc...)
I am interested to use the modules
notion introduced in v1.11
. However I can't seem to find a similar approach of check-ing in the packages instead of having to download all the packages.
Any ideas?
...ANSWER
Answered 2018-Nov-28 at 23:18Go modules provide a go mod vendor
command that will create a vendor directory in your package root, same as glide or govendor or dep do.
QUESTION
I'm trying to build the teamcity prometheus exporter I found in this repo.
In the readme it instructs me to execute the following command which should build the project -
docker run --rm -v "$PWD":/go/src/github.com/guidewire/teamcity_exporter -w /go/src/github.com/guidewire/teamcity_exporter -e GOOS=linux -e GOARCH=amd64 golang:1.8 go build -o bin/teamcity_exporter -v
But it fails with the following error -
...ANSWER
Answered 2018-Nov-16 at 18:36I would recommend changing go build
to go get
. That should fetch all the dependencies and will also build the binary and drop it into $GOPATH/bin
. go build
expects everything to already be in place.
QUESTION
I'm attempting to convert a project from govendor to dep. However, I'm finding one limitation in dep to make this impossible. In govendor, in the vendor.json file, I can have different packages from the same source have different revision hashes. Like this, for example:
...ANSWER
Answered 2018-Aug-16 at 18:17So the question is, can dep handle having packages from the same "name" with different revisions?
No.
QUESTION
I'm using Goland 2017.3 with Go 1.9.2, and have a custom GOPATH with govendor that replicates the DigitalOcean monorepo, as explained here: https://blog.digitalocean.com/cthulhu-organizing-go-code-in-a-scalable-repo/
The structure looks like this:
...ANSWER
Answered 2017-Dec-22 at 21:00Please open an issue on the tracker tracker https://youtrack.jetbrains.com/issues/Go and attach the IDE logs via Help | Collect and Show Logs in.... You can lock the visibility of the logs to jetbrains-team
and GoLand team
only so that the logs are not publicly accessible.
This looks either like a bug in the IDE or a configuration issue on your side but it's hard to tell which without logs. Thank you.
QUESTION
I've been looking into building a go project into a debian package.
I've looked into dh-make-golang and I have a nice and shiny debian
folder set up in my repository. When I try to use gbp buildpackage --git-pbuilder
though it errors out due to all of my dependencies not being found. It seems that dh-make-golang
ignores the vendor
folder when it copies everything from my project's git repository, and I use govendor
so all of my dependencies are in there.
How can I resolve this dependency issue and build the project as a .deb
package properly? For reference, the error I am getting is:
src/github.com/project/project/project.go:15:2: cannot find package "google.golang.org/grpc/grpclog" in any of:
/usr/lib/go-1.7/src/google.golang.org/grpc/grpclog (from $GOROOT)
/tmp/project/obj-x86_64-linux-gnu/src/google.golang.org/grpc/grpclog (from $GOPATH)
ANSWER
Answered 2017-Mar-29 at 06:41Take a look at goxc - it can do this for you!
You simply need to add a .goxc.json
to the root of your directory, that looks like this
QUESTION
Background
Related question: Google Container Builder: How to install govendor dependencies during build step?
I am trying to use Google Cloud Container Builder to automate the building of my Docker containers using Build Triggers.
My code is in Go, and I have a vendor
folder (checked in to Git) in my project root which contains all of my Go dependencies.
My project has four binaries that need to be Dockerized, structured as follows:
...ANSWER
Answered 2017-Oct-02 at 13:52The issue is with #1: PROJECT_ROOT
refers to the desired import path of your binaries. For example, if in program1/main/main.go
you import "github.com/foo/bar/program1"
to get the package defined in program1/program1.go
, you'd set PROJECT_ROOT=github.com/foo/bar
.
QUESTION
I am trying to use Google Cloud Container Builder to automate the building of my containers using GCP Build Triggers
My code is in Go, and I have a vendor
folder in my project root which contains all of my Go dependencies (I use govendor
). However, this vendor
folder is NOT checked in to source control.
I have a cloudbuild.yaml
file where I first build my Go source into a main
executable, and then build a Docker image using this executable. Container Builder ensures these build steps have access to my master branch.
The problem is that the Go compilation step fails, because the vendor
folder is not checked in to source control, so none of my dependencies are available for any build step.
Is there a way to create a build step that uses govendor
to install all dependencies in the vendor
folder? If so, how? Or is the only option to check in my vendor
directory into source control (which seems unnecessary to me)?
ANSWER
Answered 2017-Sep-25 at 14:51As per @JimB and @Peter's comments to my question, an easy solution is to add my vendor
directory to Git so I don't have to download all my dependencies during the build steps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install govendor
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page