From 131ec3de8e90618ad2b8f1da9e4eabdc1cd1e6b0 Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Wed, 16 Nov 2022 05:17:00 +0100 Subject: [PATCH] A few staticcheck fixes (#539) This fixes a few small staticcheck issues; turns out that staticcheck only compiles the files for the current GOOS: https://staticcheck.io/docs/running-staticcheck/cli/build-tags/ You can run all systems with: staticcheck -matrix <= n { + //lint:ignore ST1005 Windows should be capitalized w.sendError(errors.New( - "Windows system assumed buffer larger than it is, events have likely been missed.")) + "Windows system assumed buffer larger than it is, events have likely been missed")) break } } diff --git a/internal/freebsd.go b/internal/freebsd.go index 4128482..285c54b 100644 --- a/internal/freebsd.go +++ b/internal/freebsd.go @@ -16,8 +16,8 @@ var ( var maxfiles uint64 -// Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ var l syscall.Rlimit err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) if err == nil && l.Cur != l.Max { diff --git a/internal/internal.go b/internal/internal.go new file mode 100644 index 0000000..7daa45e --- /dev/null +++ b/internal/internal.go @@ -0,0 +1,2 @@ +// Package internal contains some helpers. +package internal diff --git a/internal/unix.go b/internal/unix.go index 301b242..e006de4 100644 --- a/internal/unix.go +++ b/internal/unix.go @@ -16,8 +16,8 @@ var ( var maxfiles uint64 -// Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ var l syscall.Rlimit err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) if err == nil && l.Cur != l.Max { -- 2.50.1