Update CI configs to v0.4.7

Update lint scripts and CI configs.
This commit is contained in:
Pion
2020-09-17 03:21:19 +00:00
committed by Sean DuBois
parent e2daca4615
commit d3e1775d73
36 changed files with 340 additions and 215 deletions

View File

@@ -1,22 +1,18 @@
package ice
import (
"encoding/binary"
"fmt"
"github.com/pion/stun"
)
// bin is shorthand for BigEndian.
var bin = binary.BigEndian
func assertInboundUsername(m *stun.Message, expectedUsername string) error {
var username stun.Username
if err := username.GetFrom(m); err != nil {
return err
}
if string(username) != expectedUsername {
return fmt.Errorf("username mismatch expected(%x) actual(%x)", expectedUsername, string(username))
return fmt.Errorf("%w expected(%x) actual(%x)", errMismatchUsername, expectedUsername, string(username))
}
return nil