This is more of a request for discussion rather than an issue. I find the dep sub-commands to be quite inconsistent in behaviour with each other and with the go compiler. Here's my suggestion, I'm sure there are holes in it, but I just want to start a discussion.
Proposed behavior
$ cd MyProject
$ mkdir -p ./src/my-package
$ export GOPATH=`pwd`
# write some code...
# initializes dep in my-package, .toml and .lock reside in ./src/my-package
# location based on "$GOPATH/src/$PKG/Gopkg.toml"
$ dep init my-package
# ensures deps in my-package (assumes ./src/my-package/Gopkg.toml, .lock)
$ dep ensure my-package
# updates deps in my-package (assumes ./src/my-package/Gopkg.toml, .lock)
$ dep ensure my-package -update
# prune deps in my-package (assumes ./src/my-package/Gopkg.toml, .lock)
$ dep prune my-package
# same as current cd ./src/my-package; dep status package-list...
$ dep status my-package -pkg=[packages list...]
godep version output
dep:
version : devel
build date :
git hash :
go version : go1.9.1
go compiler : gc
platform : darwin/amd64
This is more of a request for discussion rather than an issue. I find the dep sub-commands to be quite inconsistent in behaviour with each other and with the go compiler. Here's my suggestion, I'm sure there are holes in it, but I just want to start a discussion.
Proposed behavior
godep version
outputgo version
output