Skip to content

Commit

Permalink
fix gofmt lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Aug 13, 2021
1 parent 73401d8 commit 9ae0b3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ uninstall:
.PHONY: lint
lint:
@gofmt -d $(GOFILES_NOVENDOR)
@gofmt -l $(GOFILES_NOVENDOR) | read && echo "Code differs from gofmt's style" 1>&2 && exit 1 || true
@if [ $$(gofmt -l $(GOFILES_NOVENDOR) | wc -l) -ne 0 ]; then \
echo "Code differs from gofmt's style" 1>&2 && exit 1; \
fi
@GOOS=linux go vet ./...
@GOOS=linux gosec -exclude=G204,G601 ./...

Expand Down
2 changes: 1 addition & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ func (c Client) createRouterPort(ls, lr, ip, mac string) error {
klog.Errorf("failed to create switch router port %s %v", lsTolr, err)
return err
}
if len(ip) == 0 {
if len(ip) == 0 {
klog.Errorf("failed to create switch router port: ip is empty")
return err
}
Expand Down

0 comments on commit 9ae0b3c

Please sign in to comment.