diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 69e1fe0216..510b6caee1 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/kubernetes", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "github.com/onsi/ginkgo/ginkgo", "github.com/jteeuwen/go-bindata/go-bindata", @@ -2693,8 +2693,8 @@ }, { "ImportPath": "github.com/tools/godep", - "Comment": "v79", - "Rev": "f15f6db5da33a4ac48be83e20b9dd838e14f117b" + "Comment": "v80", + "Rev": "ce0bfadeb516ab23c845a85c4b0eae421ec9614b" }, { "ImportPath": "github.com/ugorji/go/codec", diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 67a039f359..c2fa5de289 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -428,7 +428,7 @@ kube::util::ensure_clean_working_dir() { # Ensure that the given godep version is installed and in the path. Almost # nobody should use any version but the default. kube::util::ensure_godep_version() { - GODEP_VERSION=${1:-"v79"} # this version is known to work + GODEP_VERSION=${1:-"v80"} # this version is known to work if [[ "$(godep version 2>/dev/null)" == *"godep ${GODEP_VERSION}"* ]]; then return diff --git a/staging/src/k8s.io/api/Godeps/Godeps.json b/staging/src/k8s.io/api/Godeps/Godeps.json index a19908e7ce..d72c7ec5a8 100644 --- a/staging/src/k8s.io/api/Godeps/Godeps.json +++ b/staging/src/k8s.io/api/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/api", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 3794da4b8b..70db64ffdc 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apiextensions-apiserver", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json index 7835fa8a23..b16a0e408c 100644 --- a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json +++ b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apimachinery", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 4e72a1122d..489cfc3a2d 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apiserver", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index a7a8995057..3d4ca8454b 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/client-go", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/code-generator/Godeps/Godeps.json b/staging/src/k8s.io/code-generator/Godeps/Godeps.json index 0fc1305ad0..9961f6d6c9 100644 --- a/staging/src/k8s.io/code-generator/Godeps/Godeps.json +++ b/staging/src/k8s.io/code-generator/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/code-generator", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index 4fdd07ed67..4cbda44ebf 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/kube-aggregator", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/metrics/Godeps/Godeps.json b/staging/src/k8s.io/metrics/Godeps/Godeps.json index 076ef5777c..72951fba3c 100644 --- a/staging/src/k8s.io/metrics/Godeps/Godeps.json +++ b/staging/src/k8s.io/metrics/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/metrics", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index 5030e91618..901d72471b 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/sample-apiserver", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json index 82d978b80f..33412fd2b9 100644 --- a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/sample-controller", "GoVersion": "go1.9", - "GodepVersion": "v79", + "GodepVersion": "v80", "Packages": [ "./..." ], diff --git a/vendor/github.com/tools/godep/Changelog.md b/vendor/github.com/tools/godep/Changelog.md index b383379a5f..476f6d11a4 100644 --- a/vendor/github.com/tools/godep/Changelog.md +++ b/vendor/github.com/tools/godep/Changelog.md @@ -1,3 +1,7 @@ +#v80 (2018/01/26) + +* Address lin/vet feedback. + #v79 (2017/02/01) * Fixes #531: fullPackageInDir didn't capture the error from fillPackage() diff --git a/vendor/github.com/tools/godep/Readme.md b/vendor/github.com/tools/godep/Readme.md index 247688d83e..e5d779ed2d 100644 --- a/vendor/github.com/tools/godep/Readme.md +++ b/vendor/github.com/tools/godep/Readme.md @@ -1,4 +1,8 @@ -## Godep +# Godep - Archived + +Please use [dep](https://github.com/golang/dep) or another tool instead. + +The rest of this readme is preserved for those that may still need its contents. [![Build Status](https://travis-ci.org/tools/godep.svg)](https://travis-ci.org/tools/godep) @@ -6,16 +10,23 @@ godep helps build packages reproducibly by fixing their dependencies. -This tool assumes you are working in a standard Go workspace, as described in -http://golang.org/doc/code.html. 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. +This tool assumes you are working in a standard Go workspace, as described [here](http://golang.org/doc/code.html). 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](FAQ.md) if you have a question. +## Golang Dep + +The Go community now has the [dep](https://github.com/golang/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 ```console -$ go get github.com/tools/godep +go get github.com/tools/godep ``` ## How to use godep with a new project @@ -24,7 +35,7 @@ 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: ```console -$ godep save +godep save ``` This will save a list of dependencies to the file `Godeps/Godeps.json` and copy @@ -64,7 +75,6 @@ time** you run a Go-related command, you wrap it in one of these two ways: `-r` isn't necessary with go1.6+ and isn't allowed. - ## Additional Operations ### Restore @@ -75,6 +85,8 @@ 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](https://github.com/golang/go/commit/42206598671a44111c8f726ad33dc7b265bdf669). +> If you run `godep restore` in your main `$GOPATH` `go get -u` will fail on packages that are behind master. + Please see the [FAQ](https://github.com/tools/godep/blob/master/FAQ.md#should-i-use-godep-restore) section about restore. ### Edit-test Cycle @@ -96,11 +108,10 @@ To add a new package foo/bar, do this: To update a package from your `$GOPATH`, do this: 1. Run `go get -u foo/bar` -1. Run `godep update foo/bar`. (You can use the `...` wildcard, for example -`godep update foo/...`). +1. Run `godep update foo/bar`. -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. +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 @@ -109,22 +120,21 @@ 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: ```go 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. - } + 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. + } } ``` @@ -132,18 +142,18 @@ Example Godeps: ```json { - "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" - } - ] + "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" + } + ] } ``` diff --git a/vendor/github.com/tools/godep/godepfile.go b/vendor/github.com/tools/godep/godepfile.go index b09d80acdf..9d267f53f5 100644 --- a/vendor/github.com/tools/godep/godepfile.go +++ b/vendor/github.com/tools/godep/godepfile.go @@ -25,10 +25,6 @@ type Godeps struct { isOldFile bool } -func createGodepsFile() (*os.File, error) { - return os.Create(godepsFile) -} - func loadGodepsFile(path string) (Godeps, error) { var g Godeps f, err := os.Open(path) @@ -201,9 +197,7 @@ func (g *Godeps) addOrUpdateDeps(deps []Dependency) { missing = append(missing, d) } } - for _, d := range missing { - g.Deps = append(g.Deps, d) - } + g.Deps = append(g.Deps, missing...) } func (g *Godeps) removeDeps(deps []Dependency) { diff --git a/vendor/github.com/tools/godep/license.go b/vendor/github.com/tools/godep/license.go index d382063426..5ce82496f9 100644 --- a/vendor/github.com/tools/godep/license.go +++ b/vendor/github.com/tools/godep/license.go @@ -51,7 +51,7 @@ func IsLegalFile(filename string) bool { } } for _, substring := range LegalFileSubstring { - if strings.Index(lowerfile, substring) != -1 { + if strings.Contains(lowerfile, substring) { return true } } diff --git a/vendor/github.com/tools/godep/list.go b/vendor/github.com/tools/godep/list.go index 40abbb57bc..283ed5d8d5 100644 --- a/vendor/github.com/tools/godep/list.go +++ b/vendor/github.com/tools/godep/list.go @@ -54,10 +54,7 @@ func (ds *depScanner) Next() (*build.Package, string) { // Continue looping? func (ds *depScanner) Continue() bool { - if len(ds.todo) > 0 { - return true - } - return false + return len(ds.todo) > 0 } // Add a package and imports to the depScanner. Skips already processed/pending package/import combos @@ -94,7 +91,7 @@ func fullPackageInDir(dir string) (*build.Package, error) { var err error pkg, ok := pkgCache[dir] if !ok { - pkg, err = build.ImportDir(dir, build.FindOnly) + pkg, _ = build.ImportDir(dir, build.FindOnly) if pkg.Goroot { pkg, err = build.ImportDir(pkg.Dir, 0) } else { diff --git a/vendor/github.com/tools/godep/msg.go b/vendor/github.com/tools/godep/msg.go index 4a6037824b..8756904bcc 100644 --- a/vendor/github.com/tools/godep/msg.go +++ b/vendor/github.com/tools/godep/msg.go @@ -27,29 +27,9 @@ func debugf(format string, a ...interface{}) (int, error) { return 0, nil } -func verbosef(format string, a ...interface{}) { - if verbose { - log.Printf(format, a...) - } -} - -func pp(a ...interface{}) (int, error) { - if debug { - return pretty.Print(a...) - } - return 0, nil -} - func ppln(a ...interface{}) (int, error) { if debug { return pretty.Println(a...) } return 0, nil } - -func ppf(format string, a ...interface{}) (int, error) { - if debug { - return pretty.Printf(format, a...) - } - return 0, nil -} diff --git a/vendor/github.com/tools/godep/rewrite.go b/vendor/github.com/tools/godep/rewrite.go index c4c859492a..f19613a7bf 100644 --- a/vendor/github.com/tools/godep/rewrite.go +++ b/vendor/github.com/tools/godep/rewrite.go @@ -98,6 +98,9 @@ func rewriteGoFile(name, qual string, paths []string) error { } fset = token.NewFileSet() f, err = parser.ParseFile(fset, name, &buffer, parser.ParseComments) + if err != nil { + return err + } ast.SortImports(fset, f) tpath := name + ".temp" t, err := os.Create(tpath) diff --git a/vendor/github.com/tools/godep/util.go b/vendor/github.com/tools/godep/util.go index df5978645a..00c58d134a 100644 --- a/vendor/github.com/tools/godep/util.go +++ b/vendor/github.com/tools/godep/util.go @@ -1,35 +1,11 @@ package main import ( - "fmt" - "os/exec" "path/filepath" "runtime" "strings" ) -// Runs a command in dir. -// The name and args are as in exec.Command. -// Stdout, stderr, and the environment are inherited -// from the current process. -func runIn(dir, name string, args ...string) error { - _, err := runInWithOutput(dir, name, args...) - return err -} - -func runInWithOutput(dir, name string, args ...string) (string, error) { - c := exec.Command(name, args...) - c.Dir = dir - o, err := c.CombinedOutput() - - if debug { - fmt.Printf("execute: %+v\n", c) - fmt.Printf(" output: %s\n", string(o)) - } - - return string(o), err -} - // driveLetterToUpper converts Windows path's drive letters to uppercase. This // is needed when comparing 2 paths with different drive letter case. func driveLetterToUpper(path string) string { diff --git a/vendor/github.com/tools/godep/vcs.go b/vendor/github.com/tools/godep/vcs.go index 5d4a16380f..4d69b1a29e 100644 --- a/vendor/github.com/tools/godep/vcs.go +++ b/vendor/github.com/tools/godep/vcs.go @@ -79,19 +79,6 @@ func VCSFromDir(dir, srcRoot string) (*VCS, string, error) { return vcsext, reporoot, nil } -// VCSForImportPath returns a VCS value for an import path. -func VCSForImportPath(importPath string) (*VCS, error) { - rr, err := vcs.RepoRootForImportPath(importPath, debug) - if err != nil { - return nil, err - } - vcs := cmd[rr.VCS] - if vcs == nil { - return nil, fmt.Errorf("%s is unsupported: %s", rr.VCS.Name, importPath) - } - return vcs, nil -} - func (v *VCS) identify(dir string) (string, error) { out, err := v.runOutput(dir, v.IdentifyCmd) return string(bytes.TrimSpace(out)), err @@ -260,22 +247,6 @@ func expand(m map[string]string, s string) string { return s } -// Mercurial has no command equivalent to git remote add. -// We handle it as a special case in process. -func hgLink(dir, remote, url string) error { - hgdir := filepath.Join(dir, ".hg") - if err := os.MkdirAll(hgdir, 0777); err != nil { - return err - } - path := filepath.Join(hgdir, "hgrc") - f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666) - if err != nil { - return err - } - fmt.Fprintf(f, "[paths]\n%s = %s\n", remote, url) - return f.Close() -} - func gitDetached(r string) (bool, error) { o, err := vcsGit.runOutput(r, "status") if err != nil { diff --git a/vendor/github.com/tools/godep/version.go b/vendor/github.com/tools/godep/version.go index 71abe8d142..e4a3e83016 100644 --- a/vendor/github.com/tools/godep/version.go +++ b/vendor/github.com/tools/godep/version.go @@ -8,7 +8,7 @@ import ( "strings" ) -const version = 79 +const version = 80 var cmdVersion = &Command{ Name: "version",