Remove pkg/errors dependency

Lots of people are paying attention to what dependecies we add to their
projects now. This just makes things a little cleaner.

Resolves #469
This commit is contained in:
Sean DuBois
2019-03-05 21:59:35 -08:00
parent 3bc9a312bb
commit 43604d5491
12 changed files with 63 additions and 66 deletions

View File

@@ -1,10 +1,6 @@
package webrtc
import (
"fmt"
"github.com/pkg/errors"
)
import "fmt"
// RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.
type RTPTransceiver struct {
@@ -20,7 +16,7 @@ type RTPTransceiver struct {
func (t *RTPTransceiver) setSendingTrack(track *Track) error {
if track == nil {
return fmt.Errorf("Track must not be nil")
return fmt.Errorf("track must not be nil")
}
t.Sender.track = track
@@ -31,7 +27,7 @@ func (t *RTPTransceiver) setSendingTrack(track *Track) error {
case RTPTransceiverDirectionInactive:
t.Direction = RTPTransceiverDirectionSendonly
default:
return errors.Errorf("Invalid state change in RTPTransceiver.setSending")
return fmt.Errorf("invalid state change in RTPTransceiver.setSending")
}
return nil
}