Add gofmt, govet

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
Riyaz Faizullabhoy 2016-12-19 15:17:37 -08:00
parent 2f79af3d1a
commit 27cb33f7b9
3 changed files with 9 additions and 3 deletions

View File

@ -3,8 +3,14 @@ DEPS=proxy diagnostics transfused tap-vsockd docker nc-vsock vsudd 9pmount-vsock
default: $(DEPS)
$(DEPS):
$(DEPS): lint
$(MAKE) -C $@
lint:
# gofmt
@test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)"
# govet
@test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
clean:
for f in $(DEPS); do $(MAKE) -C $$f clean; done

View File

@ -188,7 +188,7 @@ func handleOneIn(connid int, conn vConn, sock string) {
var docker *net.UnixConn
var err error
docker, err = net.DialUnix("unix", nil, &net.UnixAddr{sock, "unix"})
docker, err = net.DialUnix("unix", nil, &net.UnixAddr{Name: sock, Net: "unix"})
if err != nil {
// If the forwarding program has broken then close and continue

View File

@ -158,7 +158,7 @@ func handleSyslogForward(cfg string) {
/* Try and carry on... */
}
l, err := net.ListenUnixgram("unixgram", &net.UnixAddr{usock, "unixgram"})
l, err := net.ListenUnixgram("unixgram", &net.UnixAddr{Name: usock, Net: "unixgram"})
if err != nil {
console.Fatalf("Failed to listen to unixgram:%s: %s", usock, err)
}