Skip to content

Commit

Permalink
go vet required fixes (#61)
Browse files Browse the repository at this point in the history
Simple stuff. Signal buffering and using os.MkdirTemp directly.
  • Loading branch information
jmhodges authored Dec 19, 2023
1 parent dbd6316 commit ced7eb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion justrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {
waitForCommand: *waitForCommand,
}

sigCh := make(chan os.Signal)
sigCh := make(chan os.Signal, 10)
signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM)
go waitForInterrupt(sigCh, cmd)

Expand Down
3 changes: 1 addition & 2 deletions justrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package main

import (
"crypto/rand"
"io/ioutil"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -252,7 +251,7 @@ func watchTest(fs *fileSystem, inputPaths, ignoredPaths []string, cmdCh chan<- e
}

func newFS(t *testing.T) *fileSystem {
name, err := ioutil.TempDir("", "justrun_tests_")
name, err := os.MkdirTemp("", "justrun_tests_")
if err != nil {
t.Fatalf("unable to create temporary directory")
}
Expand Down

0 comments on commit ced7eb0

Please sign in to comment.