Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Consistent way to reference Gopkg.toml in CLI #558

Closed
nbosscher opened this issue Mar 6, 2018 · 1 comment
Closed

Consistent way to reference Gopkg.toml in CLI #558

nbosscher opened this issue Mar 6, 2018 · 1 comment

Comments

@nbosscher
Copy link

nbosscher commented Mar 6, 2018

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

go version output

go version go1.9.2 darwin/amd64
@nbosscher nbosscher changed the title Consistency in command line tool Consistent way to reference Gopkg.toml in command line tool Mar 6, 2018
@nbosscher nbosscher changed the title Consistent way to reference Gopkg.toml in command line tool Consistent way to reference Gopkg.toml in cli Mar 6, 2018
@nbosscher nbosscher changed the title Consistent way to reference Gopkg.toml in cli Consistent way to reference Gopkg.toml in CLI Mar 6, 2018
@nbosscher
Copy link
Author

Sorry, wrong repo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant