godeps

Go package dependencies with go dep

淺唱寂寞╮ 提交于 2019-12-24 00:37:23
问题 I have the following project structure in the same github repository: https://github.com/userX/go-project/cmd/server/main.go https://github.com/userX/go-project/pkg/package1 https://github.com/userX/go-project/pkg/package2 https://github.com/userX/go-project/pkg/package2 https://github.com/userX/go-project/Gopkg.toml And for some reason my project is in folder vendor as a dependency. And ofc I don't want that because if I change package1 I need to push it first to have the latest changes

'GoDep' is not recognized as an internal or external command

依然范特西╮ 提交于 2019-12-13 08:54:53
问题 I am trying to deploy my Go App on heroku, for which I am using Godep as build pack. After installing godep using the command go get github.com/tools/godep when I try to run godep save I am getting the error which states that 'godep' is not recognised as an internal or external command. Below is my env variables. Can someone please point out where I am going wrong ? 回答1: Setting the GOBIN value in the environment variables fixed the issue. 来源: https://stackoverflow.com/questions/49224055

Godep with local packages

回眸只為那壹抹淺笑 提交于 2019-12-11 03:26:55
问题 I have a repository that looks like this: src | |--myplace |--myprojectRepo |--someCmd | main.go |--somePackage | package.go I'm trying to use Godeps to manage dependencies. However, when I run godep save inside of the someCmd folder, it copies not just the external code into the godep _workspace , but also the somePackage code into the godep _workspace . Is there anyway to stop godep from copying code that is in the same repository into its _workspace ? The main ugliness that I see with this

How to use Go dep with GitLab subgroups

匆匆过客 提交于 2019-12-08 07:24:26
问题 I have a go project that requires some dependencies from a GitLab repository like git.mydomain.com/myteam/category/subcategory/project.git. But I'm getting this error. ensure Solve(): remote repository at https://git.mydomain.com/myteam/category.git does not exist or is inaccessible: : exit status 128 I would really thankful if someone can help me to solve this. Thanks. 回答1: This issue is discussed at length on the GitLab support tracker. TL;DR; It's (intentionally) broken for private repos:

Dependencies for Go app aren't installed through godep on Heroku

依然范特西╮ 提交于 2019-12-06 06:00:44
问题 I want to deploy Go application on Heroku, but I got an error like this: remote: -----> Go app detected remote: -----> Checking Godeps/Godeps.json file. remote: -----> Using go1.6.3 remote: !! Installing package '.' (default) remote: !! remote: !! remote: -----> Running: go install -v -tags heroku . remote: main.go:9:2: cannot find package "github.com/go-martini/martini" in any of: remote: /app/tmp/cache/go1.6.3/go/src/github.com/go-martini/martini (from $GOROOT) remote: /tmp/build

Dependencies for Go app aren't installed through godep on Heroku

偶尔善良 提交于 2019-12-04 11:07:24
I want to deploy Go application on Heroku, but I got an error like this: remote: -----> Go app detected remote: -----> Checking Godeps/Godeps.json file. remote: -----> Using go1.6.3 remote: !! Installing package '.' (default) remote: !! remote: !! remote: -----> Running: go install -v -tags heroku . remote: main.go:9:2: cannot find package "github.com/go-martini/martini" in any of: remote: /app/tmp/cache/go1.6.3/go/src/github.com/go-martini/martini (from $GOROOT) remote: /tmp/build_3c0222e075a91a3363e590a0169d6fb6/.heroku/go/src/github.com/go-martini/martini (from $GOPATH) It works on my local

How do I migrate from Dep to Go Modules

不羁岁月 提交于 2019-11-30 19:04:33
I'm currently using Dep and would like to start using Go modules. How do I migrate? Migrating from Dep to Go Modules is very easy. Run go version and make sure you're using version 11 or later. Move your code outside of GOPATH or set export GO111MODULE=on . go mod init [module path] : This will import dependencies from Gopkg.lock. go mod tidy : This will remove unnecessary imports, and add indirect ones. rm -rf vendor/ : Optional step to delete your vendor folder. go build : Do a test build to see if it works. rm -f Gopkg.lock Gopkg.toml : Delete the obsolete files used for Dep. Go has

How do I migrate from Dep to Go Modules

↘锁芯ラ 提交于 2019-11-30 03:04:04
问题 I'm currently using Dep and would like to start using Go modules. How do I migrate? 回答1: Migrating from Dep to Go Modules is very easy. Run go version and make sure you're using version 11 or later. Move your code outside of GOPATH or set export GO111MODULE=on . go mod init [module path] : This will import dependencies from Gopkg.lock. go mod tidy : This will remove unnecessary imports, and add indirect ones. rm -rf vendor/ : Optional step to delete your vendor folder. go build : Do a test