aboutsummaryrefslogtreecommitdiff
path: root/env.go
diff options
context:
space:
mode:
Diffstat (limited to 'env.go')
-rw-r--r--env.go19
1 files changed, 2 insertions, 17 deletions
diff --git a/env.go b/env.go
index 541a4b1..c9776a6 100644
--- a/env.go
+++ b/env.go
@@ -55,10 +55,8 @@ type Env struct {
// NewEnvironment will gather all information in user system.
//
func NewEnvironment(vendor, noDeps bool) (env *Env, err error) {
- if !vendor {
- if len(build.Default.GOPATH) == 0 {
- vendor = true
- }
+ if !vendor && len(build.Default.GOPATH) == 0 {
+ vendor = true
}
if len(build.Default.GOROOT) == 0 {
return nil, ErrGOROOT
@@ -135,19 +133,6 @@ func (env *Env) addExclude(importPath string) bool {
return true
}
-func (env *Env) cleanUnused() {
- for _, pkg := range env.pkgsUnused {
- fmt.Println("[ENV] cleanUnused >>>", pkg.FullPath)
- _ = pkg.Remove()
-
- pkgPath := filepath.Join(env.dirPkg, pkg.ImportPath)
-
- fmt.Println("[ENV] cleanUnused >>>", pkgPath)
- _ = os.RemoveAll(pkgPath)
- _ = libio.RmdirEmptyAll(pkgPath)
- }
-}
-
//
// Exclude mark list of packages to be excluded from future operations.
//