mirror of https://github.com/docker/docs.git
Merge pull request #340 from vieux/go_vet
hack code to not error on go vet
This commit is contained in:
commit
a9641bcfe9
|
@ -11,8 +11,10 @@ sudo: false
|
|||
install:
|
||||
- export GOPATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH
|
||||
- export PATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH
|
||||
- go get code.google.com/p/go.tools/cmd/vet
|
||||
|
||||
script:
|
||||
- script/validate-dco
|
||||
- script/validate-gofmt
|
||||
- go vet ./...
|
||||
- go test -v -race ./...
|
||||
|
|
15
flags.go
15
flags.go
|
@ -1,10 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/codegangsta/cli"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func homepath(p string) string {
|
||||
|
@ -34,9 +35,13 @@ var (
|
|||
Usage: "ip to advertise",
|
||||
EnvVar: "SWARM_ADDR",
|
||||
}
|
||||
|
||||
// hack for go vet
|
||||
flHostsValue = cli.StringSlice([]string{"tcp://127.0.0.1:2375"})
|
||||
|
||||
flHosts = cli.StringSliceFlag{
|
||||
Name: "host, H",
|
||||
Value: &cli.StringSlice{"tcp://127.0.0.1:2375"},
|
||||
Value: &flHostsValue,
|
||||
Usage: "ip/socket to listen on",
|
||||
EnvVar: "SWARM_HOST",
|
||||
}
|
||||
|
@ -79,9 +84,13 @@ var (
|
|||
Usage: "placement strategy to use [binpacking, random]",
|
||||
Value: "binpacking",
|
||||
}
|
||||
|
||||
// hack for go vet
|
||||
flFilterValue = cli.StringSlice([]string{"constraint", "affinity", "health", "port"})
|
||||
|
||||
flFilter = cli.StringSliceFlag{
|
||||
Name: "filter, f",
|
||||
Usage: "filter to use [constraint, affinity, health, port]",
|
||||
Value: &cli.StringSlice{"constraint", "affinity", "health", "port"},
|
||||
Value: &flFilterValue,
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue