From 94243f0c885f79147a0c19cb2e11dae119683f81 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Tue, 15 Jul 2025 16:50:26 +0200 Subject: all: manual linter fixes 1. recover the removed comment 2. unnecessary leading newline 3. unnecessary brackets 4. restore dropped "..." 5. use bytes.Equal instead of conversion to string --- pkg/csource/options.go | 4 ++-- pkg/symbolizer/addr2line.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/csource/options.go b/pkg/csource/options.go index 02e39980a..74d4a587a 100644 --- a/pkg/csource/options.go +++ b/pkg/csource/options.go @@ -125,11 +125,11 @@ func (opts Options) checkLinuxOnly(OS string) error { if OS == targets.Linux { return nil } - if opts.NetInjection && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD) { + if opts.NetInjection && OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD { return fmt.Errorf("option NetInjection is not supported on %v", OS) } if opts.Sandbox == sandboxNamespace || - (opts.Sandbox == sandboxSetuid && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD)) || + (opts.Sandbox == sandboxSetuid && OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD) || opts.Sandbox == sandboxAndroid { return fmt.Errorf("option Sandbox=%v is not supported on %v", opts.Sandbox, OS) } diff --git a/pkg/symbolizer/addr2line.go b/pkg/symbolizer/addr2line.go index 35cbfbe98..0cef4847b 100644 --- a/pkg/symbolizer/addr2line.go +++ b/pkg/symbolizer/addr2line.go @@ -137,7 +137,6 @@ func parse(interner *Interner, s *bufio.Scanner) ([]Frame, error) { } var frames []Frame for s.Scan() { - ln := s.Text() if len(ln) > 3 && ln[0] == '0' && ln[1] == 'x' { break -- cgit mrf-deployment