diff --git a/.github/workflows/golang-lint.yml b/.github/workflows/golang-lint.yml index 62f5dc7ce..c0568e24e 100644 --- a/.github/workflows/golang-lint.yml +++ b/.github/workflows/golang-lint.yml @@ -1,11 +1,12 @@ name: golangci-lint on: pull_request: + workflow_dispatch: permissions: contents: read # Optional: allow read access to pull request. Use with `only-new-issues` option. - # pull-requests: read + pull-requests: read jobs: golangci: @@ -23,4 +24,5 @@ jobs: # Require: The version of golangci-lint to use. # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. - version: v1.53 + version: latest + only-new-issues: true diff --git a/internal/osutil/file_test.go b/internal/osutil/file_test.go index 57441ced9..2589530c5 100644 --- a/internal/osutil/file_test.go +++ b/internal/osutil/file_test.go @@ -2,7 +2,7 @@ package osutil import ( "bytes" - "io/ioutil" + "io/ioutil" //check this "os" "path/filepath" "runtime" @@ -19,6 +19,8 @@ func validFileContent(t *testing.T, filename string, content []byte) { } } +// Testing - simulate bugs + func TestWriteFile(t *testing.T) { t.Run("write file", func(t *testing.T) { tempDir := t.TempDir()