mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
Merge pull request #2162 from halseth/make-goimports
[Makefile] Define `make imports`
This commit is contained in:
6
Makefile
6
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)
|
||||
|
||||
|
Reference in New Issue
Block a user