dependency tool for go

Godep - Archived

Please use dep or another tool instead.

The rest of this readme is preserved for those that may still need its contents.

Build Status

GoDoc

godep helps build packages reproducibly by fixing their dependencies.

This tool assumes you are working in a standard Go workspace, as described here. We expect godep to build on Go 1.4* or newer, but you can use it on any project that works with Go 1 or newer.

Please check the FAQ if you have a question.

Golang Dep

The Go community now has the dep project to manage dependencies. Please consider trying to migrate from Godep to dep. If there is an issue preventing you from migrating please file an issue with dep so the problem can be corrected. Godep will continue to be supported for some time but is considered to be in a state of support rather than active feature development.

Install

go get github.com/tools/godep

How to use godep with a new project

Assuming you've got everything working already, so you can build your project with go install and test it with go test, it's one command to start using:

godep save

This will save a list of dependencies to the file Godeps/Godeps.json and copy their source code into vendor/ (or Godeps/_workspace/ when using older versions of Go). Godep does not copy:

  • files from source repositories that are not tracked in version control.
  • *_test.go files.
  • testdata directories.
  • files outside of the go packages.

Godep does not process the imports of .go files with either the ignore or appengine build tags.

Test files and testdata directories can be saved by adding -t.

Read over the contents of vendor/ and make sure it looks reasonable. Then commit the Godeps/ and vendor/ directories to version control.

The deprecated -r flag

For older versions of Go, the -r flag tells save to automatically rewrite package import paths. This allows your code to refer directly to the copied dependencies in Godeps/_workspace. So, a package C that depends on package D will actually import C/Godeps/_workspace/src/D. This makes C's repo self-contained and causes go get to build C with the right version of all dependencies.

If you don't use -r, when using older version of Go, then in order to use the fixed dependencies and get reproducible builds, you must make sure that every time you run a Go-related command, you wrap it in one of these two ways:

  • If the command you are running is just go, run it as godep go ..., e.g. godep go install -v ./...
  • When using a different command, set your $GOPATH using godep path as described below.

-r isn't necessary with go1.6+ and isn't allowed.

Additional Operations

Restore

The godep restore installs the package versions specified in Godeps/Godeps.json to your $GOPATH. This modifies the state of packages in your $GOPATH. NOTE: godep restore leaves git repositories in a detached state. go1.6+ no longer checks out the master branch when doing a go get, see here.

If you run godep restore in your main $GOPATH go get -u will fail on packages that are behind master.

Please see the FAQ section about restore.

Edit-test Cycle

  1. Edit code
  2. Run godep go test
  3. (repeat)

Add a Dependency

To add a new package foo/bar, do this:

  1. Run go get foo/bar
  2. Edit your code to import foo/bar.
  3. Run godep save (or godep save ./...).

Update a Dependency

To update a package from your $GOPATH, do this:

  1. Run go get -u foo/bar
  2. Run godep update foo/bar.

You can use the ... wildcard, for example godep update foo/.... Before comitting the change, you'll probably want to inspect the changes to Godeps, for example with git diff, and make sure it looks reasonable.

Multiple Packages

If your repository has more than one package, you're probably accustomed to running commands like go test ./..., go install ./..., and go fmt ./.... Similarly, you should run godep save ./... to capture the dependencies of all packages in your application.

File Format

Godeps is a json file with the following structure:

type Godeps struct {
  ImportPath   string
  GoVersion    string   // Abridged output of 'go version'.
  GodepVersion string   // Abridged output of 'godep version'
  Packages     []string // Arguments to godep save, if any.
  Deps         []struct {
    ImportPath string
    Comment    string // Description of commit, if present.
    Rev        string // VCS-specific commit ID.
  }
}

Example Godeps:

{
  "ImportPath": "github.com/kr/hk",
  "GoVersion": "go1.6",
  "Deps": [
    {
      "ImportPath": "code.google.com/p/go-netrc/netrc",
      "Rev": "28676070ab99"
    },
    {
      "ImportPath": "github.com/kr/binarydist",
      "Rev": "3380ade90f8b0dfa3e363fd7d7e941fa857d0d13"
    }
  ]
}

Migrating to vendor/

Godep supports the Go 1.5+ vendor/ experiment utilizing the same environment variable that the go tooling itself supports (GO15VENDOREXPERIMENT).

godep mostly works the same way as the go command line tool. If you have go 1.5.X and set GO15VENDOREXPERIMENT=1 or have go1.6.X (or devel) vendor/ is enabled. Unless you already have a Godeps/_workspace. This is a safety feature and godep warns you about this.

When vendor/ is enabled godep will write the vendored code into the top level ./vendor/ directory. A ./Godeps/Godeps.json file is created to track the dependencies and revisions. vendor/ is not compatible with rewrites.

There is currently no automated migration between the old Godeps workspace and the vendor directory, but the following steps should work:

# just to be safe
$ unset GO15VENDOREXPERIMENT

# restore currently vendored deps to the $GOPATH
$ godep restore

# The next line is only needed to automatically undo rewritten imports that were
# created with godep save -r.
$ godep save -r=false <pkg spec>

# Remove the old Godeps folder
$ rm -rf Godeps

# If on go1.5.X to enable `vendor/`
$ export GO15VENDOREXPERIMENT=1

# re-analyze deps and save to `vendor/`.
$ godep save <pkg spec>

# Add the changes to your VCS
$ git add -A . ; git commit -am "Godep workspace -> vendor/"

# You should see your Godeps/_workspace/src files "moved" to vendor/.

Releasing

  1. Increment the version in version.go.
  2. Tag the commit with the same version number.
  3. Update Changelog.md.
Comments
  • Godep gives a godep:

    Godep gives a godep: "Package not found" error when trying to add a new library to an project already using godep

    I have a project where I am using godep. I started the project from scratch, i did a go get for all my dependencies, i did a godep save and godep moved all the dependencies to the vendor folder and every thing works as expected.

    But when I add a new dependency and tried to run godep save again, it gives me a "Package not found" error for packages already moved to the vendor folder by godep previously.

    Am i doing something wrong here??

  • Import error for Google Appengine packages

    Import error for Google Appengine packages

    Google Appengine is a common platform for Go apps, but godep can't save appengine packages because the appengine SDK shims its import paths instead of using normal VCS based import paths. So instead of import "github.com/something/appengine/datastore" it does import "appengine/datastore" and then shims the imports somehow to point to the SDK paths for the package.

    https://github.com/GoogleCloudPlatform/appengine-guestbook-go/blob/32112ced8de3e8e02bd64801f99f776527c62f23/hello.go#L8

    This is a problem because godep throws an error when it tries to import these,

    $ godep save .
    godep: cannot find package "appengine/datastore" in any of:
            /usr/local/Cellar/go/1.3/libexec/src/pkg/appengine/datastore (from $GOROOT)
            /Users/mgbelisle/go/src/appengine/datastore (from $GOPATH)
    godep: error loading dependencies
    

    which makes sense but is unfortunate. What is the proper way to fix that? This change here works but seems a little kludgy.

    https://github.com/matthewbelisle-wf/godep/commit/dba190f14fc83759b74df44e4ab4e7a492eedb1d

  • v36 unable to `godep restore` but v34 works(ish)

    v36 unable to `godep restore` but v34 works(ish)

    go get -u k8s.io/kubernetes
    go get -u github.com/tools/godep
    
    cd $GOPATH/src/k8s.io/kubernetes
    $GOPATH/bin/godep restore
    

    Fails with:

    godep: error restoring dep (github.com/Sirupsen/logrus): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/boltdb/bolt): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/boltdb/bolt
    godep: error restoring dep (github.com/docker/docker/pkg/jsonmessage): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/docker/docker/pkg/term): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/docker/libcontainer): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/google/cadvisor/api): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/google/cadvisor/http): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/google/cadvisor/manager): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/google/cadvisor/pages): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    godep: error restoring dep (github.com/google/cadvisor/validate): Unable to find dependent package golang.org/x/sys/unix in context of /tmp/gopath.aSHREx/src/github.com/Sirupsen/logrus
    
    cd $GOPATH/src/github.com/tools/godep
    git checkout v34
    go install github.com/tools/godep
    
    cd $GOPATH/src/k8s.io/kubernetes
    $GOPATH/bin/godep restore
    

    Returns without error

  • │godep: directory

    │godep: directory "XXX/GoProjects/src" is not using a known version control system

    I am trying to run godep save from within my package and I am getting the error in the title.

    Here is some information:

    My GOPATH envvar is set to "XXX/GoProjects"

    My directory structure looks like this under GOPATH:

    bin/
    pkg/
    src/
        proj1/
              .git/
              ...
              main.go        #all files in this project are in package main
          proj2/
              .git/
              ...
              proj2.go   #all files in this project are in package proj2 (matches parent dir).       
    

    I can execute all the go tools fine, even go list.

    the output of go list -json is (modied a bit for security purposes):

    {
        "Dir": "XXXX/src/proj1.git",
        "ImportPath": "proj1.git",
        "Name": "main",
        "Doc": "blah",
        "Target": "XXXX/bin/proj1.git",
        "Root": "XXXX",   #matches GOPATH
        "GoFiles": [
            "handlers.go",
            "main.go",
            "util.go"
        ],
        "Imports": [
            "crypto/tls",
            "crypto/x509",
            "encoding/base64",
            "encoding/json",
            "flag",
            "fmt",
            "goku.git",    # our own library
            "io/ioutil",
            "log",
            "net/http",
            "os",
            "path/filepath",
            "regexp",
            "strings"
        ],
        "Deps": [
            "bufio",
            "bytes",
            "compress/flate",
            "compress/gzip",
            "container/heap",
            "crypto",
            "crypto/aes",
            "crypto/cipher",
            "crypto/des",
            "crypto/dsa",
            "crypto/ecdsa",
            "crypto/elliptic",
            "crypto/hmac",
            "crypto/md5",
            "crypto/rand",
            "crypto/rc4",
            "crypto/rsa",
            "crypto/sha1",
            "crypto/sha256",
            "crypto/subtle",
            "crypto/tls",
            "crypto/x509",
            "crypto/x509/pkix",
            "encoding",
            "encoding/asn1",
            "encoding/base64",
            "encoding/binary",
            "encoding/hex",
            "encoding/json",
            "encoding/pem",
            "errors",
            "flag",
            "fmt",
            "github.com/rcrowley/go-metrics",
            "github.com/rcrowley/go-tigertonic",
            "goku.git",
            "hash",
            "hash/crc32",
            "io",
            "io/ioutil",
            "log",
            "log/syslog",
            "math",
            "math/big",
            "math/rand",
            "mime",
            "mime/multipart",
            "net",
            "net/http",
            "net/textproto",
            "net/url",
            "os",
            "path",
            "path/filepath",
            "reflect",
            "regexp",
            "regexp/syntax",
            "runtime",
            "runtime/cgo",
            "runtime/debug",
            "sort",
            "strconv",
            "strings",
            "sync",
            "sync/atomic",
            "syscall",
            "time",
            "unicode",
            "unicode/utf16",
            "unicode/utf8",
            "unsafe"
        ],
        "TestGoFiles": [
            "handlers_test.go",
            "proj1_test.go",
            "util_test.go"
        ],
        "TestImports": [
            "crypto/tls",
            "crypto/x509",
            "crypto/x509/pkix",
            "github.com/stretchr/testify/assert",
            "github.com/stretchr/testify/mock",
            "github.com/stretchr/testify/suite",
            "net/http",
            "net/url",
            "testing"
        ]
    }
    

    No idea what is going on here. I saw in another (already closed) issue that this is how the directory structure should look, so I am obviously doing something else wrong.

  • godep save ./... on v54 and go1.6 not creating vendor/ dir

    godep save ./... on v54 and go1.6 not creating vendor/ dir

    I've recently upgraded to Go1.6 and just grabbed the newest Godep v54.

    I deleted my Godeps/ and vendor/ dirs to vendor fresh.

    rm -rf Godeps/
    rm -rf vendor/
    
    godep save ./...
    

    Saw my Godeps.json file significantly modified (added a ton more deps, namely looks like it included all of the aws-sdk-go packages), but no vendor/ dir was created.

    Tried a couple of different things. Started over and did not remove previous Godeps/ or vendor/ but just ran godep save ./... --> spit out a ton of these errors:

    godep: rewrite: lstat <path-to-project>/advisor-notifications/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go: no such file or directory
    godep: rewrite: lstat <path-to-project>/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go: no such file or directory
    
    

    etc...

    The same modifications were made to Godeps.json as stated above, but a ton of deps were also deleted from vendor/. I tried building the project on Jenkins with these changes but it failed.

    <path-to-project>/vendor/github.com/aws/aws-sdk-go/private/signer/v4
    ../vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go:150: cannot use req.Config.LogLevel.Value() (type "github.com/aws/aws-sdk-go/aws".LogLevelType) as type "<path-to-project>/vendor/github.com/aws/aws-sdk-go/aws".LogLevelType in field value
    

    Not sure what's going on?

  • Package not found

    Package not found

    Expected behavior

    godep save identifies all dependencies in a new project and saves the json in the GoDeps folder to be created

    Actual behavior

    Fails with error - $godep save ./... godep: Package (github.com/kr/logfmt) not found

    Steps to reproduce behavior

    1. New Project
    2. Take dependency on go-kit packages
    3. Run GoDep

      godep version output

      $godep version godep v74 (darwin/amd64/go1.7)

      go version output

      $godep version godep v74 (darwin/amd64/go1.7)

      Contents of Godeps.json file

    4. None available - it is a brand new run for a new go-kit microservice
  • godep unintentionally stripping license files from vendored libraries when target is a subdirectory

    godep unintentionally stripping license files from vendored libraries when target is a subdirectory

    It appears godep strips license files and other data from dependencies when godep save is used. I have a project which uses a nested subdirectory as the main entry point for most folks. When godep save is used by consumers of the library, this is the resulting file hierarchy.

    Godeps/_workspace/src/github.com/cactus/go-statsd-client
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/buffered.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/buffered_bench_test.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/buffered_test.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/doc.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/main.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/main_bench_test.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/main_test.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/noop.go
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/test-client
    Godeps/_workspace/src/github.com/cactus/go-statsd-client/statsd/test-client/main.go
    

    Note the lack of a LICENSE file which is present in the original repository. This means projects using the repo in conjunction with godep would be in non-compliance with the license, wholly unintentionally.

    There are several other projects which use similar hierarchy layouts. Here is one such example.

  • Godep doesn't work when symlinks are used to map projects into go workspace

    Godep doesn't work when symlinks are used to map projects into go workspace

    I keep my projects under ~/Projects and then sym-link it into my go workspace under ~/.go/src/github.com/xyz/xyz. This doesn't seem to work with godep, when I run it (with a cwd of ~/.go/src/github.com/xyz/xyz) I get the following error:

    $ godep save
    godep: directory "/Users/lachlan/Projects/xyz/xyz" is outside source root "."
    godep: error loading packages
    

    By comparison, go list ./... works fine.

    If I copy the directory into place, rather than sym-link it, the problem goes away.

  • "godep save" said "is not using a known version control system"

    Firts at all, the version of GOLANG that I'm using is 1.2.1(go1.2.1.linux-amd64.tar.gz ).

    Second, godep was downloaded from https://github.com/kr/godep the same say of this post(09/03/2014).

    My GOLANG tree is :

    $GOPATH / bin --------------------/ godep -------------/ pkg -------------/ src --------------------/ github.com / aresetian / server / --------------------------------------------------------------/ main.go

    My problem :

    when I write "godep save" from the place where is main.go the message on console is : godep: directory "XYXYXYXYXY" is not using a known version control system godep: error loading packages

    XYXYXYXYXY : path where is $GOPATH

    I have read some post; Add a -extonly option to "godep save" #48 ,http://mmcgrana.github.io/2012/09/getting-started-with-go-on-heroku.html, but there aren't one that can help me to solve this problem.

  • feature request: support alternate project layouts

    feature request: support alternate project layouts

    godep holds a strong opinion about how the source tree of a project is managed. See https://groups.google.com/forum/#!topic/golang-nuts/8NJq6jTIpas. Like Frank, our repository contains the entire source tree (and more). This allows ut do have a company-wide Makefile that implements various policies and procedures useful to our workflow, and allows stuff related to the project to be stored in the same git repo (ex: Vagrantfiles). Also, we have a policy where all of our code must use the same dependencies.

    In summary, this is our git repository structure:

    /
    /ops
    /go
    /go/src/company.com/proj1
    /go/src/company.com/proj2
    

    godep is incompatible with this structure. Example: cd go/src/company.com && godep save will fail with a "directory ../x/y/z/go is not using a known version control system", probably because /go is not the top-level directory of the repository.

    godep has all of the other features we'd like in a dependency management system, but changing our model to support its requirements is too constraining for us. My request is that godep be adapted to support this pattern.

  • godep save with GO15VENDOREXPERIMENT V35

    godep save with GO15VENDOREXPERIMENT V35

    $ export GO15VENDOREXPERIMENT=1
    $ mkdir -p $GOPATH/src/github.com/test/pkg
    $ cd $GOPATH/src/github.com/test/pkg
    $ cat > main.go <<EOF
    package main
    
    import "github.com/bitly/go-simplejson"
    
    func main() {
        simplejson.New()
    }
    EOF
    $ go get
    $ godep save
    

    vendor directory is not created and simplejson is missing in Godeps/Godeps.json:

    {
        "ImportPath": "github.com/eleme/test",
        "GoVersion": "go1.5.1",
        "Deps": []
    }
    

    V34 works as expected, am I expecting the wrong thing?

  • i used gin, gin used +build

    i used gin, gin used +build

    My project used gin, and in gin, you can use built in 'encoding/json' or 'jsoniter', my porject use 'encoding/json',so in $GOPATH/src,I don't have jsoniter,my gin works good when i use 'godep save ' my project,shows info: godep: Package (github.com/json-iterator/go) not found

    I think there are a lot like this, because gin used govendor, when i entered gin' s source direcotry,use govender list,there are lots of missing, but i build success

    m github.com/campoy/embedmd m github.com/client9/misspell/cmd/misspell m github.com/davecgh/go-spew/spew v1.1 v1.1.1 m github.com/dustin/go-broadcast m github.com/gin-gonic/autotls m github.com/jessevdk/go-assets m github.com/json-iterator/go v1.1 v1.1.5 m github.com/manucorporat/stats m github.com/stretchr/testify/assert v1.2 v1.2.2 m github.com/thinkerou/favicon m golang.org/x/lint/golint m golang.org/x/net/context m golang.org/x/sync/errgroup m google.golang.org/grpc m google.golang.org/grpc/reflection

    When i 'godep save' may i exclude some,like in my case,exclude jsoniter?

  • Build failed after godep save

    Build failed after godep save

    go build success, then I godep save and go build failed:

    # git.xfyun.cn/container/genesis/modules/authentication
    modules/authentication/createKubeConfigGo.go:135:40: cannot use kubeconfig.CreateWithToken(spec.APIServer, clustername, spec.ClientName, "git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/util/cert".EncodeCertPEM(spec.CACert), spec.TokenAuth.Token) (type *"k8s.io/client-go/tools/clientcmd/api".Config) as type *"git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/tools/clientcmd/api".Config in return argument
    modules/authentication/createKubeConfigGo.go:150:86: cannot use clientCertConfig (type "git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/util/cert".Config) as type "k8s.io/client-go/util/cert".Config in argument to pkiutil.NewCertAndKey
    modules/authentication/createKubeConfigGo.go:156:39: cannot use kubeconfig.CreateWithCerts(spec.APIServer, clustername, spec.ClientName, "git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/util/cert".EncodeCertPEM(spec.CACert), "git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/util/cert".EncodePrivateKeyPEM(clientKey), "git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/util/cert".EncodeCertPEM(clientCert)) (type *"k8s.io/client-go/tools/clientcmd/api".Config) as type *"git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/tools/clientcmd/api".Config in return argument
    modules/authentication/createKubeConfigGo.go:175:35: cannot use config (type *"git.xfyun.cn/container/genesis/vendor/k8s.io/client-go/tools/clientcmd/api".Config) as type *"k8s.io/client-go/tools/clientcmd/api".Config in argument to kubeconfig.WriteToDisk
    

    Steps to reproduce behavior

    git clone https://github.com/kubernetes/kubernetes
    cp -r kubernetes $GOPATH/src/k8s.io/
    cp -r kubernetes/vendor/k8s.io/* $GOPATH/src/k8s.io
    rm  $GOPATH/src/k8s.io/kubernetes/.git
    cd $GOPATH/src/k8s.io
    git init && git add . && git commit -m add
    

    Our project using kubernetes source code, then go build will success. then:

    godep save
    go build
    

    build failed. beacuse of godep not save kubernetes:

    ╰─➤  ls vendor/k8s.io                                                                                               2 ↵
    api          apimachinery client-go    utils
    

    we import this: kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"

    godep version output

    godep v80 (darwin/amd64/go1.9.2)

    go version output

    go version go1.9.2 darwin/amd64

  • Changed git provider. Most vendor packages are still using the old git link

    Changed git provider. Most vendor packages are still using the old git link

    Hi,

    My employer recently switched git provider, from bitbucket to github. There was also a different developer working on this project. I noticed he used Godeps. I am wondering if this package could help me change all the package imports/links to github instead of bitbucket.

    Note: I am fairly new with goLang.

    Thank you!

    Expected behavior

    Need go install to look for 'github.com/accountName/repoName/folderName' instead of 'bitbucket.org/accountName/repoName/folderName'.

    Actual behavior

    After 'go clone' from github. Did 'go install'. I am receiving '.... cannot find package "bitbucket.org/accountName/repoName/folderName" in any of:' /Users/myName/golang/src/github.com/accountName/repoName/vendor/bitbucket.org/accountName/repoName/folderName (vendor tree) /usr/local/go/src/bitbucket.org/accountName/repoName/folderName (from $GOROOT) /Users/myName/golang/src/bitbucket.org/accountName/repoName/folderName (from $GOPATH)

    Steps to reproduce behavior

    Private repo. Please excuse the privacy.

    godep version output

    I have not installed godep myself.

    go version output

    go version go1.10.3 darwin/amd64

    Contents of Godeps.json file

    { "ImportPath": "bitbucket.org/accountName/repoName", "GoVersion": "go1.7", "GodepVersion": "v79", "Deps": [ ... ], }

  • Can the specified directory be excluded when `godep save`

    Can the specified directory be excluded when `godep save`

    Can the specified directory be excluded when godep save

    I have a node_modules folder under my project directory, which contains a lot of JS files. godep save can't work very well.

  • godep restore connects to internet even if package is in the GOPATH

    godep restore connects to internet even if package is in the GOPATH

    Expected behavior

    if the dependency is in the GOPATH it should not require the internet connection, our build machines are behind the proxy and downloads are usually very slow through proxy.

    Actual behavior

    It seems it is downloading something not sure if it is just metadata or actual package, which makes our build really slow.

    Steps to reproduce behavior

    1. godep save 
    2. delete everything from Godeps directory except Godeps.json file [we do not commit third party packages], these packages will in the GOPATH when we build.
    3. disconnect internet
    4. godep restore
    

    godep version output

    godep v74 (darwin/amd64/go1.6.2)

    go version output

    go version go1.6.2 darwin/amd64

    Contents of Godeps.json file

    
 "ImportPath": “project.com/A/B/C/D",
 "GoVersion": "go1.6",
 "GodepVersion": "v67",
 "Deps": [
 {
 "ImportPath": "golang.org/x/net/context",
 "Rev": "6a513affb38dc9788b449d59ffed099b8de18fa0"
 },
 {
 "ImportPath": "golang.org/x/net/context/ctxhttp",
 "Rev": "6a513affb38dc9788b449d59ffed099b8de18fa0"
 },
 {
 "ImportPath": "golang.org/x/net/http2",
 "Rev": "6a513affb38dc9788b449d59ffed099b8de18fa0"
 },
 {
 "ImportPath": "golang.org/x/net/http2/hpack",
 "Rev": "6a513affb38dc9788b449d59ffed099b8de18fa0"
 },
 {
 "ImportPath": "golang.org/x/oauth2",
 "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
 },
 {
 "ImportPath": "golang.org/x/oauth2/google",
 "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
 },
 {
 "ImportPath": "golang.org/x/oauth2/internal",
 "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
 },
 {
 "ImportPath": "golang.org/x/oauth2/jws",
 "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
 },
 {
 "ImportPath": "golang.org/x/oauth2/jwt",
 "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
 },
 {
 "ImportPath": "google.golang.org/cloud/compute/metadata",
 "Rev": "eb47ba841d53d93506cfbfbc03927daf9cc48f88"
 },
 {
 "ImportPath": "google.golang.org/cloud/internal",
 "Rev": "eb47ba841d53d93506cfbfbc03927daf9cc48f88"
 },
 {
 "ImportPath": "gopkg.in/inf.v0",
 "Comment": "v0.9.0",
 "Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
 },
 {
 "ImportPath": "gopkg.in/mgo.v2",
 "Comment": "r2016.02.04-3-g29cc868",
 "Rev": "29cc868a5ca65f401ff318143f9408d02f4799cc"
 },
 {
 "ImportPath": "gopkg.in/mgo.v2/bson",
 "Comment": "r2016.02.04-3-g29cc868",
 "Rev": "29cc868a5ca65f401ff318143f9408d02f4799cc"
 },
 {
 "ImportPath": "gopkg.in/mgo.v2/internal/sasl",
 "Comment": "r2016.02.04-3-g29cc868",
 "Rev": "29cc868a5ca65f401ff318143f9408d02f4799cc"
 },
 {
 "ImportPath": "gopkg.in/mgo.v2/internal/scram",
 "Comment": "r2016.02.04-3-g29cc868",
 "Rev": "29cc868a5ca65f401ff318143f9408d02f4799cc"
 },
 {
 "ImportPath": "gopkg.in/yaml.v2",
 "Rev": "a83829b6f1293c91addabc89d0571c246397bbf4"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/endpoints",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/errors",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/install",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/meta",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/meta/metatypes",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/pod",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 },
 {
 "ImportPath": "k8s.io/kubernetes/pkg/api/resource",
 "Comment": "v1.3.0",
 "Rev": "283137936a498aed572ee22af6774b6fb6e9fd94"
 }

 ]
}


  • godep get doesn't seem to do anything with vendor

    godep get doesn't seem to do anything with vendor

    Expected behavior

    godep get should add the package to vendor just like godep save ./... would.

    Actual behavior

    godep get looks at the packages, but doesn't add it to vendor and to Godeps.json

    Steps to reproduce behavior

    1. set up Godeps with Go 1.6.3 for a project
    2. try to use godep get to add a package to vendor
    3. the package doesn't get added to vendor

    I can reproduce this with a simple brand new setup and with existing setups.

    godep version output

    godep v74 (linux/amd64/go1.6.3)

    go version output

    go version go1.6.3 linux/amd64

Spaghetti: a dependency analysis tool for Go packages
Spaghetti: a dependency analysis tool for Go packages

Spaghetti is an interactive web-based tool to help you understand the dependencies of a Go program, and to explore and evaluate various possible efforts to eliminate dependencies.

Dec 15, 2022
A simple dependency manager for Go (golang), inspired by Bundler.
A simple dependency manager for Go (golang), inspired by Bundler.

Goop A dependency manager for Go (golang), inspired by Bundler. It is different from other dependency managers in that it does not force you to mess w

Sep 27, 2022
Barebones dependency manager for Go.
Barebones dependency manager for Go.

Go Package Manager Go Package Manager (or gpm, for short) is a tool that helps achieve reproducible builds for Go applications by specifying the revis

Dec 14, 2022
Barebones dependency manager for Go.
Barebones dependency manager for Go.

Johnny Deps Johnny Deps is a small tool from VividCortex that provides minimalistic dependency versioning for Go repositories using Git. Its primary p

Sep 27, 2022
Go Dependency Analysis toolkit

Goda is a Go dependency analysis toolkit. It contains tools to figure out what your program is using.

Jan 2, 2023
Go Package Manager (gopm) is a package manager and build tool for Go.

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? In favor of Go Modules Proxy since Go 1.11, this pr

Dec 14, 2022
Go tool for major version upgrades

GOMAJOR $ gomajor help GoMajor is a tool for major version upgrades Usage: gomajor <command> [arguments] The commands are: get upgrad

Dec 29, 2022
Go dependency management tool experiment (deprecated)
Go dependency management tool experiment (deprecated)

Dep dep is a dependency management tool for Go. It requires Go 1.9 or newer to compile. NOTE: Dep was an official experiment to implement a package ma

Dec 23, 2022
dependency tool for go

Godep - Archived Please use dep or another tool instead. The rest of this readme is preserved for those that may still need its contents. godep helps

Dec 14, 2022
depth is tool to retrieve and visualize Go source code dependency trees.

depth is tool to retrieve and visualize Go source code dependency trees. Install Download the appropriate binary for your platform from the Rele

Dec 30, 2022
Tool to check for dependency confusion vulnerabilities in multiple package management systems

Confused A tool for checking for lingering free namespaces for private package names referenced in dependency configuration for Python (pypi) requirem

Jan 2, 2023
Spaghetti: a dependency analysis tool for Go packages
Spaghetti: a dependency analysis tool for Go packages

Spaghetti is an interactive web-based tool to help you understand the dependencies of a Go program, and to explore and evaluate various possible efforts to eliminate dependencies.

Dec 15, 2022
Just a simple CLI tool to group dependabot PRs by dependency and merge them.
Just a simple CLI tool to group dependabot PRs by dependency and merge them.

Dependabotbot Have you been the victim of a lodash update? Has your notification page in Github been assaulted by needing to update a patch version of

Jun 30, 2022
Interactive dependency graph visualization tool for golang
Interactive dependency graph visualization tool for golang

Interactive dependency graph visualization tool for golang using the awesome cytoscape graph visualizer.

Sep 1, 2022
Web-based, zero-config, dependency-free database schema change and version control tool for teams
Web-based, zero-config, dependency-free database schema change and version control tool for teams

Live Demo • Install • Help • Development • Design Doc Bytebase is a web-based, zero-config, dependency-free database schema change and version control

Jan 1, 2023
A Simple and Clear CLI library. Dependency free.
A Simple and Clear CLI library. Dependency free.

A Simple and Clear CLI library. Dependency free. Features Nested Subcommands Uses the standard library flag package Auto-generated help Custom banners

Jan 1, 2023
Dependency-free replacement for GNU parallel, perfect fit for usage in an initramfs.

coshell v0.2.5 A no-frills dependency-free replacement for GNU parallel, perfect for initramfs usage. Licensed under GNU/GPL v2. How it works An sh -c

Dec 19, 2022
Simple, zero-dependency scheduling library for Go

go-quartz Simple, zero-dependency scheduling library for Go. About Inspired by the Quartz Java scheduler. Library building blocks Job interface. Any t

Dec 30, 2022
hiboot is a high performance web and cli application framework with dependency injection support

Hiboot - web/cli application framework About Hiboot is a cloud native web and cli application framework written in Go. Hiboot is not trying to reinven

Nov 20, 2022
A powerful zero-dependency json logger.

ZKits Logger Library About This package is a library of ZKits project. This is a zero-dependency standard JSON log library that supports structured JS

Dec 14, 2022