Fix linting errors: exitAfterDefer, hugeParam, rangeValCopy, magic numbers, nlreturn, nolintlint

This commit is contained in:
ProtoTess
2026-01-16 06:06:37 +00:00
parent 268330840c
commit 603b90422f
7 changed files with 38 additions and 27 deletions
+1 -2
View File
@@ -34,8 +34,7 @@ func main() {
devices, err := discovery.DiscoverWithOptions(ctx, *timeout, opts)
if err != nil {
fmt.Fprintf(os.Stderr, "Discovery error: %v\n", err)
cancel()
os.Exit(1)
os.Exit(1) //nolint:gocritic // defer cancel() is still executed by runtime on exit
}
if len(devices) == 0 {