Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0828b199
Unverified
Commit
0828b199
authored
Apr 02, 2018
by
Christoph Blecker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update godep in vendor
parent
ba71e630
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
70 additions
and
133 deletions
+70
-133
Godeps.json
Godeps/Godeps.json
+5
-3
Godeps.json
staging/src/k8s.io/api/Godeps/Godeps.json
+1
-1
Godeps.json
...ing/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/client-go/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/code-generator/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/metrics/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-controller/Godeps/Godeps.json
+1
-1
Changelog.md
vendor/github.com/tools/godep/Changelog.md
+4
-0
Readme.md
vendor/github.com/tools/godep/Readme.md
+43
-33
godepfile.go
vendor/github.com/tools/godep/godepfile.go
+1
-7
license.go
vendor/github.com/tools/godep/license.go
+1
-1
list.go
vendor/github.com/tools/godep/list.go
+2
-5
msg.go
vendor/github.com/tools/godep/msg.go
+0
-20
rewrite.go
vendor/github.com/tools/godep/rewrite.go
+3
-0
util.go
vendor/github.com/tools/godep/util.go
+0
-24
vcs.go
vendor/github.com/tools/godep/vcs.go
+0
-29
version.go
vendor/github.com/tools/godep/version.go
+1
-1
No files found.
Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/kubernetes"
,
"ImportPath"
:
"k8s.io/kubernetes"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"github.com/onsi/ginkgo/ginkgo"
,
"github.com/onsi/ginkgo/ginkgo"
,
"github.com/jteeuwen/go-bindata/go-bindata"
,
"github.com/jteeuwen/go-bindata/go-bindata"
,
...
@@ -1204,10 +1204,12 @@
...
@@ -1204,10 +1204,12 @@
},
},
{
{
"ImportPath"
:
"github.com/garyburd/redigo/internal"
,
"ImportPath"
:
"github.com/garyburd/redigo/internal"
,
"Comment"
:
"v1.0.0-1-gb8dc900"
,
"Rev"
:
"b8dc90050f24c1a73a52f107f3f575be67b21b7c"
"Rev"
:
"b8dc90050f24c1a73a52f107f3f575be67b21b7c"
},
},
{
{
"ImportPath"
:
"github.com/garyburd/redigo/redis"
,
"ImportPath"
:
"github.com/garyburd/redigo/redis"
,
"Comment"
:
"v1.0.0-1-gb8dc900"
,
"Rev"
:
"b8dc90050f24c1a73a52f107f3f575be67b21b7c"
"Rev"
:
"b8dc90050f24c1a73a52f107f3f575be67b21b7c"
},
},
{
{
...
@@ -2629,8 +2631,8 @@
...
@@ -2629,8 +2631,8 @@
},
},
{
{
"ImportPath"
:
"github.com/tools/godep"
,
"ImportPath"
:
"github.com/tools/godep"
,
"Comment"
:
"v
79
"
,
"Comment"
:
"v
80
"
,
"Rev"
:
"
f15f6db5da33a4ac48be83e20b9dd838e14f117
b"
"Rev"
:
"
ce0bfadeb516ab23c845a85c4b0eae421ec9614
b"
},
},
{
{
"ImportPath"
:
"github.com/ugorji/go/codec"
,
"ImportPath"
:
"github.com/ugorji/go/codec"
,
...
...
staging/src/k8s.io/api/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/api"
,
"ImportPath"
:
"k8s.io/api"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/apiextensions-apiserver"
,
"ImportPath"
:
"k8s.io/apiextensions-apiserver"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/apimachinery"
,
"ImportPath"
:
"k8s.io/apimachinery"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/apiserver/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/apiserver"
,
"ImportPath"
:
"k8s.io/apiserver"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/client-go/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/client-go"
,
"ImportPath"
:
"k8s.io/client-go"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/code-generator/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/code-generator"
,
"ImportPath"
:
"k8s.io/code-generator"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/kube-aggregator"
,
"ImportPath"
:
"k8s.io/kube-aggregator"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/metrics/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/metrics"
,
"ImportPath"
:
"k8s.io/metrics"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/sample-apiserver"
,
"ImportPath"
:
"k8s.io/sample-apiserver"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
staging/src/k8s.io/sample-controller/Godeps/Godeps.json
View file @
0828b199
{
{
"ImportPath"
:
"k8s.io/sample-controller"
,
"ImportPath"
:
"k8s.io/sample-controller"
,
"GoVersion"
:
"go1.9"
,
"GoVersion"
:
"go1.9"
,
"GodepVersion"
:
"v
79
"
,
"GodepVersion"
:
"v
80
"
,
"Packages"
:
[
"Packages"
:
[
"./..."
"./..."
],
],
...
...
vendor/github.com/tools/godep/Changelog.md
View file @
0828b199
#v80 (2018/01/26)
*
Address lin/vet feedback.
#v79 (2017/02/01)
#v79 (2017/02/01)
*
Fixes #531: fullPackageInDir didn't capture the error from fillPackage()
*
Fixes #531: fullPackageInDir didn't capture the error from fillPackage()
...
...
vendor/github.com/tools/godep/Readme.md
View file @
0828b199
## 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.
[

](https://travis-ci.org/tools/godep)
[

](https://travis-ci.org/tools/godep)
...
@@ -6,16 +10,23 @@
...
@@ -6,16 +10,23 @@
godep helps build packages reproducibly by fixing their dependencies.
godep helps build packages reproducibly by fixing their dependencies.
This tool assumes you are working in a standard Go workspace, as described in
This tool assumes you are working in a standard Go workspace, as described
[
here
](
http://golang.org/doc/code.html
)
. We
http://golang.org/doc/code.html. We expect godep to build on Go 1.4
*
or newer,
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.
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.
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
## Install
```
console
```
console
$
go get github.com/tools/godep
go get github.com/tools/godep
```
```
## How to use godep with a new project
## 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
...
@@ -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:
with
`go install`
and test it with
`go test`
, it's one command to start using:
```
console
```
console
$
godep save
godep save
```
```
This will save a list of dependencies to the file
`Godeps/Godeps.json`
and copy
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:
...
@@ -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.
`-r`
isn't necessary with go1.6+ and isn't allowed.
## Additional Operations
## Additional Operations
### Restore
### Restore
...
@@ -75,6 +85,8 @@ modifies the state of packages in your `$GOPATH`. NOTE: `godep restore` leaves
...
@@ -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
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
)
.
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.
Please see the
[
FAQ
](
https://github.com/tools/godep/blob/master/FAQ.md#should-i-use-godep-restore
)
section about restore.
### Edit-test Cycle
### Edit-test Cycle
...
@@ -96,11 +108,10 @@ To add a new package foo/bar, do this:
...
@@ -96,11 +108,10 @@ To add a new package foo/bar, do this:
To update a package from your
`$GOPATH`
, do this:
To update a package from your
`$GOPATH`
, do this:
1.
Run
`go get -u foo/bar`
1.
Run
`go get -u foo/bar`
1.
Run
`godep update foo/bar`
. (You can use the
`...`
wildcard, for example
1.
Run
`godep update foo/bar`
.
`godep update foo/...`
).
Before comitting the change, you'll probably want to inspect the changes
to
You can use the
`...`
wildcard, for example
`godep update foo/...`
. Before comitting the change, you'll probably want
to
Godeps, for example with
`git diff`
, and make sure it looks reasonable.
inspect the changes to
Godeps, for example with
`git diff`
, and make sure it looks reasonable.
## Multiple Packages
## Multiple Packages
...
@@ -109,22 +120,21 @@ running commands like `go test ./...`, `go install ./...`, and `go fmt ./...`.
...
@@ -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
Similarly, you should run
`godep save ./...`
to capture the dependencies of all
packages in your application.
packages in your application.
## File Format
## File Format
Godeps is a json file with the following structure:
Godeps is a json file with the following structure:
```
go
```
go
type
Godeps
struct
{
type
Godeps
struct
{
ImportPath
string
ImportPath
string
GoVersion
string
// Abridged output of 'go version'.
GoVersion
string
// Abridged output of 'go version'.
GodepVersion
string
// Abridged output of 'godep version'
GodepVersion
string
// Abridged output of 'godep version'
Packages
[]
string
// Arguments to godep save, if any.
Packages
[]
string
// Arguments to godep save, if any.
Deps
[]
struct
{
Deps
[]
struct
{
ImportPath
string
ImportPath
string
Comment
string
// Description of commit, if present.
Comment
string
// Description of commit, if present.
Rev
string
// VCS-specific commit ID.
Rev
string
// VCS-specific commit ID.
}
}
}
}
```
```
...
@@ -132,18 +142,18 @@ Example Godeps:
...
@@ -132,18 +142,18 @@ Example Godeps:
```
json
```
json
{
{
"ImportPath"
:
"github.com/kr/hk"
,
"ImportPath"
:
"github.com/kr/hk"
,
"GoVersion"
:
"go1.6"
,
"GoVersion"
:
"go1.6"
,
"Deps"
:
[
"Deps"
:
[
{
{
"ImportPath"
:
"code.google.com/p/go-netrc/netrc"
,
"ImportPath"
:
"code.google.com/p/go-netrc/netrc"
,
"Rev"
:
"28676070ab99"
"Rev"
:
"28676070ab99"
},
},
{
{
"ImportPath"
:
"github.com/kr/binarydist"
,
"ImportPath"
:
"github.com/kr/binarydist"
,
"Rev"
:
"3380ade90f8b0dfa3e363fd7d7e941fa857d0d13"
"Rev"
:
"3380ade90f8b0dfa3e363fd7d7e941fa857d0d13"
}
}
]
]
}
}
```
```
...
...
vendor/github.com/tools/godep/godepfile.go
View file @
0828b199
...
@@ -25,10 +25,6 @@ type Godeps struct {
...
@@ -25,10 +25,6 @@ type Godeps struct {
isOldFile
bool
isOldFile
bool
}
}
func
createGodepsFile
()
(
*
os
.
File
,
error
)
{
return
os
.
Create
(
godepsFile
)
}
func
loadGodepsFile
(
path
string
)
(
Godeps
,
error
)
{
func
loadGodepsFile
(
path
string
)
(
Godeps
,
error
)
{
var
g
Godeps
var
g
Godeps
f
,
err
:=
os
.
Open
(
path
)
f
,
err
:=
os
.
Open
(
path
)
...
@@ -201,9 +197,7 @@ func (g *Godeps) addOrUpdateDeps(deps []Dependency) {
...
@@ -201,9 +197,7 @@ func (g *Godeps) addOrUpdateDeps(deps []Dependency) {
missing
=
append
(
missing
,
d
)
missing
=
append
(
missing
,
d
)
}
}
}
}
for
_
,
d
:=
range
missing
{
g
.
Deps
=
append
(
g
.
Deps
,
missing
...
)
g
.
Deps
=
append
(
g
.
Deps
,
d
)
}
}
}
func
(
g
*
Godeps
)
removeDeps
(
deps
[]
Dependency
)
{
func
(
g
*
Godeps
)
removeDeps
(
deps
[]
Dependency
)
{
...
...
vendor/github.com/tools/godep/license.go
View file @
0828b199
...
@@ -51,7 +51,7 @@ func IsLegalFile(filename string) bool {
...
@@ -51,7 +51,7 @@ func IsLegalFile(filename string) bool {
}
}
}
}
for
_
,
substring
:=
range
LegalFileSubstring
{
for
_
,
substring
:=
range
LegalFileSubstring
{
if
strings
.
Index
(
lowerfile
,
substring
)
!=
-
1
{
if
strings
.
Contains
(
lowerfile
,
substring
)
{
return
true
return
true
}
}
}
}
...
...
vendor/github.com/tools/godep/list.go
View file @
0828b199
...
@@ -54,10 +54,7 @@ func (ds *depScanner) Next() (*build.Package, string) {
...
@@ -54,10 +54,7 @@ func (ds *depScanner) Next() (*build.Package, string) {
// Continue looping?
// Continue looping?
func
(
ds
*
depScanner
)
Continue
()
bool
{
func
(
ds
*
depScanner
)
Continue
()
bool
{
if
len
(
ds
.
todo
)
>
0
{
return
len
(
ds
.
todo
)
>
0
return
true
}
return
false
}
}
// Add a package and imports to the depScanner. Skips already processed/pending package/import combos
// 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) {
...
@@ -94,7 +91,7 @@ func fullPackageInDir(dir string) (*build.Package, error) {
var
err
error
var
err
error
pkg
,
ok
:=
pkgCache
[
dir
]
pkg
,
ok
:=
pkgCache
[
dir
]
if
!
ok
{
if
!
ok
{
pkg
,
err
=
build
.
ImportDir
(
dir
,
build
.
FindOnly
)
pkg
,
_
=
build
.
ImportDir
(
dir
,
build
.
FindOnly
)
if
pkg
.
Goroot
{
if
pkg
.
Goroot
{
pkg
,
err
=
build
.
ImportDir
(
pkg
.
Dir
,
0
)
pkg
,
err
=
build
.
ImportDir
(
pkg
.
Dir
,
0
)
}
else
{
}
else
{
...
...
vendor/github.com/tools/godep/msg.go
View file @
0828b199
...
@@ -27,29 +27,9 @@ func debugf(format string, a ...interface{}) (int, error) {
...
@@ -27,29 +27,9 @@ func debugf(format string, a ...interface{}) (int, error) {
return
0
,
nil
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
)
{
func
ppln
(
a
...
interface
{})
(
int
,
error
)
{
if
debug
{
if
debug
{
return
pretty
.
Println
(
a
...
)
return
pretty
.
Println
(
a
...
)
}
}
return
0
,
nil
return
0
,
nil
}
}
func
ppf
(
format
string
,
a
...
interface
{})
(
int
,
error
)
{
if
debug
{
return
pretty
.
Printf
(
format
,
a
...
)
}
return
0
,
nil
}
vendor/github.com/tools/godep/rewrite.go
View file @
0828b199
...
@@ -98,6 +98,9 @@ func rewriteGoFile(name, qual string, paths []string) error {
...
@@ -98,6 +98,9 @@ func rewriteGoFile(name, qual string, paths []string) error {
}
}
fset
=
token
.
NewFileSet
()
fset
=
token
.
NewFileSet
()
f
,
err
=
parser
.
ParseFile
(
fset
,
name
,
&
buffer
,
parser
.
ParseComments
)
f
,
err
=
parser
.
ParseFile
(
fset
,
name
,
&
buffer
,
parser
.
ParseComments
)
if
err
!=
nil
{
return
err
}
ast
.
SortImports
(
fset
,
f
)
ast
.
SortImports
(
fset
,
f
)
tpath
:=
name
+
".temp"
tpath
:=
name
+
".temp"
t
,
err
:=
os
.
Create
(
tpath
)
t
,
err
:=
os
.
Create
(
tpath
)
...
...
vendor/github.com/tools/godep/util.go
View file @
0828b199
package
main
package
main
import
(
import
(
"fmt"
"os/exec"
"path/filepath"
"path/filepath"
"runtime"
"runtime"
"strings"
"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
// driveLetterToUpper converts Windows path's drive letters to uppercase. This
// is needed when comparing 2 paths with different drive letter case.
// is needed when comparing 2 paths with different drive letter case.
func
driveLetterToUpper
(
path
string
)
string
{
func
driveLetterToUpper
(
path
string
)
string
{
...
...
vendor/github.com/tools/godep/vcs.go
View file @
0828b199
...
@@ -79,19 +79,6 @@ func VCSFromDir(dir, srcRoot string) (*VCS, string, error) {
...
@@ -79,19 +79,6 @@ func VCSFromDir(dir, srcRoot string) (*VCS, string, error) {
return
vcsext
,
reporoot
,
nil
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
)
{
func
(
v
*
VCS
)
identify
(
dir
string
)
(
string
,
error
)
{
out
,
err
:=
v
.
runOutput
(
dir
,
v
.
IdentifyCmd
)
out
,
err
:=
v
.
runOutput
(
dir
,
v
.
IdentifyCmd
)
return
string
(
bytes
.
TrimSpace
(
out
)),
err
return
string
(
bytes
.
TrimSpace
(
out
)),
err
...
@@ -260,22 +247,6 @@ func expand(m map[string]string, s string) string {
...
@@ -260,22 +247,6 @@ func expand(m map[string]string, s string) string {
return
s
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
)
{
func
gitDetached
(
r
string
)
(
bool
,
error
)
{
o
,
err
:=
vcsGit
.
runOutput
(
r
,
"status"
)
o
,
err
:=
vcsGit
.
runOutput
(
r
,
"status"
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
vendor/github.com/tools/godep/version.go
View file @
0828b199
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
"strings"
"strings"
)
)
const
version
=
79
const
version
=
80
var
cmdVersion
=
&
Command
{
var
cmdVersion
=
&
Command
{
Name
:
"version"
,
Name
:
"version"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment