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:
|
install:
|
||||||
- export GOPATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH
|
- export GOPATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH
|
||||||
- export PATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH
|
- export PATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH
|
||||||
|
- go get code.google.com/p/go.tools/cmd/vet
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- script/validate-dco
|
- script/validate-dco
|
||||||
- script/validate-gofmt
|
- script/validate-gofmt
|
||||||
|
- go vet ./...
|
||||||
- go test -v -race ./...
|
- go test -v -race ./...
|
||||||
|
|
|
||||||
15
flags.go
15
flags.go
|
|
@ -1,10 +1,11 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/codegangsta/cli"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
|
"github.com/codegangsta/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func homepath(p string) string {
|
func homepath(p string) string {
|
||||||
|
|
@ -34,9 +35,13 @@ var (
|
||||||
Usage: "ip to advertise",
|
Usage: "ip to advertise",
|
||||||
EnvVar: "SWARM_ADDR",
|
EnvVar: "SWARM_ADDR",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hack for go vet
|
||||||
|
flHostsValue = cli.StringSlice([]string{"tcp://127.0.0.1:2375"})
|
||||||
|
|
||||||
flHosts = cli.StringSliceFlag{
|
flHosts = cli.StringSliceFlag{
|
||||||
Name: "host, H",
|
Name: "host, H",
|
||||||
Value: &cli.StringSlice{"tcp://127.0.0.1:2375"},
|
Value: &flHostsValue,
|
||||||
Usage: "ip/socket to listen on",
|
Usage: "ip/socket to listen on",
|
||||||
EnvVar: "SWARM_HOST",
|
EnvVar: "SWARM_HOST",
|
||||||
}
|
}
|
||||||
|
|
@ -79,9 +84,13 @@ var (
|
||||||
Usage: "placement strategy to use [binpacking, random]",
|
Usage: "placement strategy to use [binpacking, random]",
|
||||||
Value: "binpacking",
|
Value: "binpacking",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hack for go vet
|
||||||
|
flFilterValue = cli.StringSlice([]string{"constraint", "affinity", "health", "port"})
|
||||||
|
|
||||||
flFilter = cli.StringSliceFlag{
|
flFilter = cli.StringSliceFlag{
|
||||||
Name: "filter, f",
|
Name: "filter, f",
|
||||||
Usage: "filter to use [constraint, affinity, health, port]",
|
Usage: "filter to use [constraint, affinity, health, port]",
|
||||||
Value: &cli.StringSlice{"constraint", "affinity", "health", "port"},
|
Value: &flFilterValue,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue