From c1f7497078d0468fefdb5daf5ee3d3f9772d9042 Mon Sep 17 00:00:00 2001 From: Saxon Date: Wed, 27 Feb 2019 17:16:15 +1030 Subject: [PATCH] stream/mts: using fmt.Errorf instead of fmt.Sprintf inside errors.New --- stream/mts/mpegts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/mts/mpegts.go b/stream/mts/mpegts.go index 8173d2ce..e9bbf0e1 100644 --- a/stream/mts/mpegts.go +++ b/stream/mts/mpegts.go @@ -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