Skip to content

Commit

Permalink
Merge pull request #2162 from halseth/make-goimports
Browse files Browse the repository at this point in the history
[Makefile] Define `make imports`
  • Loading branch information
halseth authored Jan 29, 2021
2 parents 688a804 + c3b20e3 commit 10a81e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion monitoring/monitoring_on.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 10a81e0

Please sign in to comment.