dep ensure removing the install folders

3.1k Views Asked by At

I have installed the httprouter package using the following command

dep ensure -add github.com/julienschmidt/httprouter

      vendor
        └── github.com
            ├── julienschmidt
            │   └── httprouter

Then I have installed the uuid package

dep ensure -add github.com/satori/go.uuid
  vendor
        └── github.com
            ├── satori

The julienschmidt router package gone away. Why dep is deleting the previous installation ?

Deleting the entry on Gopkg.lock

Gopkg.toml has this entry

[[constraint]]
  name = "github.com/julienschmidt/httprouter"
  version = "1.1.0"

[[constraint]]
  name = "github.com/satori/go.uuid"
  version = "1.2.0"

Will this affect anything ?

My directory structure

gopath/src/github.com
- services
  - service-auth
  - service-signup
- vendor
   - github.com

Thanks.

1

There are 1 best solutions below

4
On
"github.com/julienschmidt/httprouter" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor/.
If you run "dep ensure" again before actually importing it, it will disappear from Gopkg.lock and vendor/.

If you just run dep ensure -add {package} without importing it in code. It will got remove in the next dep ensure