From 0b946848ee48a0a9d25f323176b6da6d2c2fccdd Mon Sep 17 00:00:00 2001 From: Sargun Dhillon Date: Mon, 16 Nov 2020 03:49:02 -0800 Subject: [PATCH] Add fmt target This adds a target that allows the users to run goimports across the entire repo. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index dbef1edb4..5b6108379 100644 --- a/Makefile +++ b/Makefile @@ -191,3 +191,7 @@ envtest: kubebuilder_2.3.1_${TEST_OS}_${TEST_ARCH} # You can add klog flags for debugging, like: -klog.v=10 -klog.logtostderr # klogv2 flags just wraps our existing logrus. go test -v ./internal/test/vk_envtest -envtest=true + +.PHONY: fmt +fmt: + goimports -w $(shell go list -f '{{.Dir}}' ./...)