Fix up go vet errors and integrate with ci

This commit is contained in:
James Shubin
2016-01-04 19:22:35 -05:00
parent d8cbeb56f9
commit 904ace8027
5 changed files with 9 additions and 7 deletions

View File

@@ -149,7 +149,7 @@ func ConfigWatch(file string) chan bool {
ch <- true ch <- true
} }
} }
close(ch) //close(ch)
}() }()
return ch return ch
} }

View File

@@ -135,7 +135,7 @@ func EtcdWatch(kapi etcd.KeysAPI) chan etcdMsg {
} }
} // end for loop } // end for loop
close(ch) //close(ch)
}(ch) // call go routine }(ch) // call go routine
return ch return ch
} }

View File

@@ -111,7 +111,7 @@ func run(c *cli.Context) {
case etcdStart, etcdEvent: case etcdStart, etcdEvent:
// pass // pass
default: default:
log.Fatal("Etcd: Unhandled message: %v", msg) log.Fatal("Etcd: Unhandled message: ", msg)
} }
case msg := <-configchan: case msg := <-configchan:
if c.Bool("no-watch") || !msg { if c.Bool("no-watch") || !msg {

View File

@@ -71,7 +71,7 @@ func (obj *ServiceType) Watch() {
bus, err := dbus.SystemBus() bus, err := dbus.SystemBus()
if err != nil { if err != nil {
log.Fatal("Failed to connect to bus: %v\n", err) log.Fatal("Failed to connect to bus: ", err)
} }
// XXX: will this detect new units? // XXX: will this detect new units?

View File

@@ -13,10 +13,12 @@ diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS)
./test/test-gofmt.sh ./test/test-gofmt.sh
./test/test-yamlfmt.sh ./test/test-yamlfmt.sh
go test go test
#go test ./pgraph echo running go vet # since it doesn't output an ok message on pass
go vet && echo PASS
# do these longer tests only when running on ci # do these longer tests only when running on ci
if env | grep -q '^TRAVIS=true$'; then if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL='; then
go test -race go test -race
#go test -race ./pgraph echo running go vet
go vet && echo PASS
fi fi