From 6dfefe39cec2d699654210ca3261a6c6149a9e97 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 24 Nov 2020 12:34:31 +0100 Subject: [PATCH 1/3] make: exclude autogenerated files from go fmt --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4b10a2ff..b37be265 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 From 892635a93d97ab3605a51dba8e93d652b2b799b1 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 6 Nov 2018 15:18:24 +0100 Subject: [PATCH 2/3] make: run goimports during make fmt --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b37be265..bdbffa15 100644 --- a/Makefile +++ b/Makefile @@ -232,7 +232,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) From c3b20e34a7f25a7d6df101b92b52657bea402518 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 24 Nov 2020 12:35:05 +0100 Subject: [PATCH 3/3] monitoring: run go fmt --- monitoring/monitoring_on.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" )