update golangci-lint

This commit is contained in:
aler9
2021-05-23 18:43:40 +02:00
parent 70c0dc7800
commit 94e69f9c7f
18 changed files with 67 additions and 60 deletions

View File

@@ -416,8 +416,10 @@ func (s *SessionDescription) unmarshalMediaDescription(value string) error {
// Set according to currently registered with IANA
// https://tools.ietf.org/html/rfc4566#section-5.14
for _, proto := range strings.Split(fields[2], "/") {
if i := indexOf(proto, []string{"UDP", "RTP", "AVP", "SAVP", "SAVPF",
"MP2T", "TLS", "DTLS", "SCTP", "AVPF", "TCP"}); i == -1 {
if i := indexOf(proto, []string{
"UDP", "RTP", "AVP", "SAVP", "SAVPF",
"MP2T", "TLS", "DTLS", "SCTP", "AVPF", "TCP",
}); i == -1 {
return fmt.Errorf("%w `%v`", errSDPInvalidNumericValue, fields[2])
}
newMediaDesc.MediaName.Protos = append(newMediaDesc.MediaName.Protos, proto)