Skip to content

Commit

Permalink
pkg: fix lint staticcheck
Browse files Browse the repository at this point in the history
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Aug 16, 2024
1 parent 822ad59 commit ffd9a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pkg/event_processor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ func TestEventProcessor_Serve(t *testing.T) {
var err error
err = ep.Serve()
if err != nil {
log.Fatalf(err.Error())
//log.Fatalf(err.Error())
t.Error(err)
return
}
}()
content, err := os.ReadFile(testFile)
if err != nil {
//Do something
log.Fatalf("open file error: %s, file:%s", err.Error(), testFile)
t.Fatalf("open file error: %s, file:%s", err.Error(), testFile)
}
lines := strings.Split(string(content), "\n")

Expand Down
4 changes: 2 additions & 2 deletions user/module/probe_openssl_lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ func (m *MOpenSSLProbe) detectOpenssl(soPath string) error {

}

f.Close()
buf = buf[:0]
_ = f.Close()
//buf = buf[:0]

var bpfFile string
var found bool
Expand Down

0 comments on commit ffd9a91

Please sign in to comment.