.github/workflows: add gofmt (goimports) check

Change-Id: Iceb3182827b9c65f28f0351e0e254abe4a95e4de
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2022-07-26 09:20:53 -07:00 committed by Brad Fitzpatrick
parent dd3e91b678
commit 7c671b0220
2 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,9 @@ jobs:
- name: Check out code - name: Check out code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Run gofmt (goimports)
run: go run golang.org/x/tools/cmd/goimports -d --format-only .
- name: Run go vet - name: Run go vet
run: go vet ./... run: go vet ./...

View File

@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build for_go_mod_tidy_only
// +build for_go_mod_tidy_only
package tooldeps package tooldeps
import ( import (
_ "github.com/tailscale/depaware/depaware" _ "github.com/tailscale/depaware/depaware"
_ "golang.org/x/tools/cmd/goimports"
) )