diff --git a/Makefile b/Makefile index efdcef17..b2156a22 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ GOINSTALL := GO111MODULE=on go install -v GOTEST := GO111MODULE=on go test GOVERSION := $(shell go version | awk '{print $$3}') -GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*") +GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -name "*pb.go" -not -name "*pb.gw.go") RM := rm -f CP := cp @@ -245,7 +245,9 @@ fuzz-run: $(GOFUZZ_BIN) # UTILITIES # ========= -fmt: +fmt: goimports + @$(call print, "Fixing imports.") + goimports -w $(GOFILES_NOVENDOR) @$(call print, "Formatting source.") gofmt -l -w -s $(GOFILES_NOVENDOR) diff --git a/monitoring/monitoring_on.go b/monitoring/monitoring_on.go index c3daa07f..8f10bec4 100644 --- a/monitoring/monitoring_on.go +++ b/monitoring/monitoring_on.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc" - "github.com/grpc-ecosystem/go-grpc-prometheus" + grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/lightningnetwork/lnd/lncfg" "github.com/prometheus/client_golang/prometheus/promhttp" )