mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-26 20:18:52 +00:00
Add gofmt, govet
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
parent
2f79af3d1a
commit
27cb33f7b9
@ -3,8 +3,14 @@ DEPS=proxy diagnostics transfused tap-vsockd docker nc-vsock vsudd 9pmount-vsock
|
|||||||
|
|
||||||
default: $(DEPS)
|
default: $(DEPS)
|
||||||
|
|
||||||
$(DEPS):
|
$(DEPS): lint
|
||||||
$(MAKE) -C $@
|
$(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:
|
clean:
|
||||||
for f in $(DEPS); do $(MAKE) -C $$f clean; done
|
for f in $(DEPS); do $(MAKE) -C $$f clean; done
|
||||||
|
@ -188,7 +188,7 @@ func handleOneIn(connid int, conn vConn, sock string) {
|
|||||||
var docker *net.UnixConn
|
var docker *net.UnixConn
|
||||||
var err error
|
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 err != nil {
|
||||||
// If the forwarding program has broken then close and continue
|
// If the forwarding program has broken then close and continue
|
||||||
|
@ -158,7 +158,7 @@ func handleSyslogForward(cfg string) {
|
|||||||
/* Try and carry on... */
|
/* 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 {
|
if err != nil {
|
||||||
console.Fatalf("Failed to listen to unixgram:%s: %s", usock, err)
|
console.Fatalf("Failed to listen to unixgram:%s: %s", usock, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user