From 311cdcb1daa1e13a69f278977a19b4474a1460e8 Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Tue, 12 Jun 2018 01:03:01 -0700 Subject: [PATCH] Fix all go vet issues --- internal/sdp/template.go | 2 -- internal/sdp/unmarshal.go | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/sdp/template.go b/internal/sdp/template.go index 3a36bd24..2388980b 100644 --- a/internal/sdp/template.go +++ b/internal/sdp/template.go @@ -54,6 +54,4 @@ func VP8OnlyDescription(iceUsername, icePassword, fingerprint string, candidates videoMediaDescription, }, } - - return nil } diff --git a/internal/sdp/unmarshal.go b/internal/sdp/unmarshal.go index 572626de..65548fac 100644 --- a/internal/sdp/unmarshal.go +++ b/internal/sdp/unmarshal.go @@ -25,7 +25,7 @@ func attributeValid(statuses []*attributeStatus, attribute string) (err error) { if v.value == attribute { if v.seen && !v.allowMultiple { - return errors.Errorf("Attribute %s was attempted to be set twice", attribute, v.value) + return errors.Errorf("Attribute %s was attempted to be set twice: %v", attribute, v.value) } attrFound = true v.seen = true @@ -210,9 +210,7 @@ func (s *SessionDescription) unmarshalMedias(scanner *bufio.Scanner, firstMediaN case "a": currentMedia.Attributes = append(currentMedia.Attributes, value) default: - return errors.Errorf("Invalid media attribute: %s") + return errors.Errorf("Invalid media attribute: %s", key) } } - - return nil }