File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ CONTROLLER_GEN := $(BIN_DIR)/controller-gen
1212SETUP_ENVTEST := $(BIN_DIR ) /setup-envtest
1313STATICCHECK := $(BIN_DIR ) /staticcheck
1414CUSTOMCHECKER := $(BIN_DIR ) /custom-checker
15+ GOIMPORTS := $(BIN_DIR ) /goimports
1516GH := $(BIN_DIR ) /gh
1617YQ := $(BIN_DIR ) /yq
1718
@@ -40,6 +41,7 @@ download-tools: $(GH) $(YQ)
4041 GOBIN=$(BIN_DIR ) go install sigs.k8s.io/kustomize/kustomize/v5@v$(KUSTOMIZE_VERSION )
4142 GOBIN=$(BIN_DIR ) go install github.com/cybozu-go/golang-custom-analyzer/cmd/custom-checker@latest
4243 GOBIN=$(BIN_DIR ) go install honnef.co/go/tools/cmd/staticcheck@latest
44+ GOBIN=$(BIN_DIR ) go install golang.org/x/tools/cmd/goimports@latest
4345
4446.PHONY : download-crds
4547download-crds :
@@ -144,6 +146,7 @@ list-actions: ## List used GitHub Actions
144146check-generate : # # Check for commit omissions of auto-generated files
145147 $(MAKE ) manifests
146148 $(MAKE ) generate
149+ $(GOIMPORTS ) -w -local github.com/cybozu-go/contour-plus .
147150 go mod tidy
148151 git diff --exit-code --name-only
149152
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ import (
88 "strings"
99 "text/tabwriter"
1010
11- "github.com/cybozu-go/contour-plus/controllers"
1211 "github.com/spf13/cobra"
1312 "github.com/spf13/pflag"
1413 "github.com/spf13/viper"
1514 "k8s.io/klog/v2"
1615 "sigs.k8s.io/controller-runtime/pkg/log/zap"
16+
17+ "github.com/cybozu-go/contour-plus/controllers"
1718 // +kubebuilder:scaffold:imports
1819)
1920
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ import (
55 "os"
66 "strings"
77
8- "github.com/cybozu-go/contour-plus/controllers"
98 "github.com/spf13/viper"
109 "k8s.io/apimachinery/pkg/runtime"
1110 ctrl "sigs.k8s.io/controller-runtime"
1211 "sigs.k8s.io/controller-runtime/pkg/client"
1312 "sigs.k8s.io/controller-runtime/pkg/log/zap"
1413 metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
14+
15+ "github.com/cybozu-go/contour-plus/controllers"
1516)
1617
1718var (
You can’t perform that action at this time.
0 commit comments