diff --git a/.github/workflows/staticcheck.yml b/.github/workflows/staticcheck.yml index a1deb93b5..adf936d8a 100644 --- a/.github/workflows/staticcheck.yml +++ b/.github/workflows/staticcheck.yml @@ -21,6 +21,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Run gofmt (goimports) + run: go run golang.org/x/tools/cmd/goimports -d --format-only . + - name: Run go vet run: go vet ./... diff --git a/internal/tooldeps/tooldeps.go b/internal/tooldeps/tooldeps.go index babd897ae..92c25ff28 100644 --- a/internal/tooldeps/tooldeps.go +++ b/internal/tooldeps/tooldeps.go @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build for_go_mod_tidy_only +// +build for_go_mod_tidy_only + package tooldeps import ( _ "github.com/tailscale/depaware/depaware" + _ "golang.org/x/tools/cmd/goimports" )