Skip to content

Commit 6e575cb

Browse files
authored
Merge pull request #126 from cybozu-go/goimports
use goimports
2 parents 1f0d0d1 + cb3ff83 commit 6e575cb

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CONTROLLER_GEN := $(BIN_DIR)/controller-gen
1212
SETUP_ENVTEST := $(BIN_DIR)/setup-envtest
1313
STATICCHECK := $(BIN_DIR)/staticcheck
1414
CUSTOMCHECKER := $(BIN_DIR)/custom-checker
15+
GOIMPORTS := $(BIN_DIR)/goimports
1516
GH := $(BIN_DIR)/gh
1617
YQ := $(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
4547
download-crds:
@@ -144,6 +146,7 @@ list-actions: ## List used GitHub Actions
144146
check-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

cmd/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

cmd/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

1718
var (

0 commit comments

Comments
 (0)