Merge pull request #2162 from halseth/make-goimports
[Makefile] Define `make imports`
This commit is contained in:
commit
10a81e01e3
6
Makefile
6
Makefile
@ -46,7 +46,7 @@ GOINSTALL := GO111MODULE=on go install -v
|
|||||||
GOTEST := GO111MODULE=on go test
|
GOTEST := GO111MODULE=on go test
|
||||||
|
|
||||||
GOVERSION := $(shell go version | awk '{print $$3}')
|
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
|
RM := rm -f
|
||||||
CP := cp
|
CP := cp
|
||||||
@ -245,7 +245,9 @@ fuzz-run: $(GOFUZZ_BIN)
|
|||||||
# UTILITIES
|
# UTILITIES
|
||||||
# =========
|
# =========
|
||||||
|
|
||||||
fmt:
|
fmt: goimports
|
||||||
|
@$(call print, "Fixing imports.")
|
||||||
|
goimports -w $(GOFILES_NOVENDOR)
|
||||||
@$(call print, "Formatting source.")
|
@$(call print, "Formatting source.")
|
||||||
gofmt -l -w -s $(GOFILES_NOVENDOR)
|
gofmt -l -w -s $(GOFILES_NOVENDOR)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"google.golang.org/grpc"
|
"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/lightningnetwork/lnd/lncfg"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user