stream/mts: using fmt.Errorf instead of fmt.Sprintf inside errors.New

This commit is contained in:
Saxon 2019-02-27 17:16:15 +10:30
parent 1e9fcda47c
commit c1f7497078
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ func FindPID(d []byte, pid uint16) (pkt []byte, i int, err error) {
return
}
}
return nil, -1, errors.New(fmt.Sprintf("could not find packet with pid: %d",pid))
return nil, -1, fmt.Errorf("could not find packet with pid: %d",pid)
}
// FillPayload takes a channel and fills the packets Payload field until the