Skip to content

Commit

Permalink
style: trivial golangci-lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 15, 2024
1 parent 99d5733 commit 0ea95c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions wrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const (
osArchEnvVar = "WRUN_OS_ARCH"
cacheVersion = "v2"
cacheDirDigestPlaceholder = "_"
defaultHttpTimeout = 5 * time.Minute
defaultHTTPTimeout = 5 * time.Minute
)

var hashesByName = map[string]crypto.Hash{
Expand Down Expand Up @@ -225,8 +225,8 @@ func parseFlags(set *flag.FlagSet, args []string) (config, error) {
return nil
})
set.BoolVar(&cfg.usePreCommitCache, "use-pre-commit-cache", false, "Use pre-commit's cache dir")
set.DurationVar(&cfg.httpTimeout, "http-timeout", defaultHttpTimeout, "HTTP client timeout")
set.BoolFunc("version", "Output version and exit", func(s string) error {
set.DurationVar(&cfg.httpTimeout, "http-timeout", defaultHTTPTimeout, "HTTP client timeout")
set.BoolFunc("version", "Output version and exit", func(_ string) error {
if _, err := fmt.Fprintln(set.Output(), versionString); err != nil {
return fmt.Errorf("write version: %w", err)
}
Expand Down Expand Up @@ -343,7 +343,6 @@ func main() {
warnOut := func(format string, a ...any) {
if verbose == nil || *verbose {
_out(os.Stderr, "WARN", format, a...)

}
}
errorOut := func(format string, a ...any) {
Expand Down
2 changes: 1 addition & 1 deletion wrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func Test_parseFlags(t *testing.T) {
},
},
archiveExePathMatches: nil,
httpTimeout: defaultHttpTimeout,
httpTimeout: defaultHTTPTimeout,
}
got, err := parseFlags(set, args)
require.NoError(t, err)
Expand Down

0 comments on commit 0ea95c6

Please sign in to comment.