Fix linter errors

This commit is contained in:
Patrick Pacher
2022-10-10 18:08:09 +02:00
committed by Daniel
parent 77c0d954a9
commit 0810eee7bb
3 changed files with 16 additions and 8 deletions

View File

@@ -68,6 +68,7 @@ type Process struct {
ExecHashes map[string]string
}
// GetTag returns the process tag with the given ID.
func (p *Process) GetTag(tagID string) (profile.Tag, bool) {
for _, t := range p.Tags {
if t.Key == tagID {
@@ -239,7 +240,7 @@ func loadProcess(ctx context.Context, pid int) (*Process, error) {
if runtime.GOOS != "windows" {
process.Cwd, err = pInfo.Cwd()
if err != nil {
log.Warningf("process: failed to get Cwd: %w", err)
log.Warningf("process: failed to get Cwd: %s", err)
}
}