diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3252a1b..e108997 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,6 @@ jobs: - name: Install Tools run: | - go install github.com/securego/gosec/v2/cmd/gosec@latest go install github.com/axw/gocov/gocov@latest go install github.com/AlekSi/gocov-xml@latest go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest diff --git a/main.go b/main.go index 397bea5..2978c36 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func SetMSTeams() { if f.msTeamsHook == "" { return } - // get hostname + hostname, _ := os.Hostname() os.Setenv("APP_NAME", f.filePath) os.Setenv("APP_ENV", hostname) diff --git a/pkg/watcher.go b/pkg/watcher.go index 12cf650..35131ec 100644 --- a/pkg/watcher.go +++ b/pkg/watcher.go @@ -143,7 +143,7 @@ func (w *Watcher) loadState() error { if err != nil { return err } - fmt.Sscanf(lastLineStr, "%d", &w.lastLineNum) + fmt.Sscanf(lastLineStr, "%d", &w.lastLineNum) // nolint: errcheck lastFileSizeStr, err := tx.Get(w.lastFileSizeKey) if errors.Is(err, buntdb.ErrNotFound) { @@ -152,7 +152,7 @@ func (w *Watcher) loadState() error { if err != nil { return err } - fmt.Sscanf(lastFileSizeStr, "%d", &w.lastFileSize) + fmt.Sscanf(lastFileSizeStr, "%d", &w.lastFileSize) // nolint: errcheck return nil }) }