From 17aa7ce1e67db38cc0123f8ab1bb9536f96529b6 Mon Sep 17 00:00:00 2001 From: John Boyes Date: Sat, 10 Feb 2024 09:56:00 +0000 Subject: [PATCH] Format Go files using gofumpt to remove warnings --- internal/github/action.go | 3 +-- internal/github/action_test.go | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/github/action.go b/internal/github/action.go index 647d7c42..2f949798 100644 --- a/internal/github/action.go +++ b/internal/github/action.go @@ -127,10 +127,9 @@ func (a *Action) pullRequestNumber() int { func (a *Action) outputResult(result string) { labelCheckOutput := fmt.Sprintf("label_check=%s", result) gitHubOutputFileName := filepath.Clean(os.Getenv("GITHUB_OUTPUT")) - githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0644) + githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644) panic.IfError(err) _, err = githubOutputFile.WriteString(labelCheckOutput) - if err != nil { closingErr := githubOutputFile.Close() diff --git a/internal/github/action_test.go b/internal/github/action_test.go index c4e661d7..2aaa6b75 100644 --- a/internal/github/action_test.go +++ b/internal/github/action_test.go @@ -14,19 +14,19 @@ import ( "github.com/agilepathway/label-checker/internal/error/panic" ) -//nolint: gochecknoglobals +// nolint: gochecknoglobals var integration = flag.Bool( "integration", false, "Make calls to real external services. Requires INPUT_REPO_TOKEN environment variable.") -//nolint: gochecknoglobals +// nolint: gochecknoglobals var enterpriseCloud = flag.Bool( "enterprise-cloud", false, "Run the label checker against GitHub Enterprise Cloud instead of standard GitHub") -//nolint: gochecknoglobals +// nolint: gochecknoglobals var enterpriseServer = flag.Bool( "enterprise-server", false,