mirror of
https://github.com/pion/stun.git
synced 2025-10-24 08:13:45 +08:00
Update CI configs to v0.4.5
Update lint scripts and CI configs. Excluding codecov.yml.
This commit is contained in:
@@ -9,7 +9,7 @@ func BenchmarkMessage_GetNotFound(b *testing.B) {
|
||||
m := New()
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
m.Get(AttrRealm)
|
||||
m.Get(AttrRealm) //nolint: errcheck
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func BenchmarkMessage_Get(b *testing.B) {
|
||||
m.Add(AttrUsername, []byte{1, 2, 3, 4, 5, 6, 7})
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
m.Get(AttrUsername)
|
||||
m.Get(AttrUsername) //nolint: errcheck
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ func TestRawAttribute_AddTo(t *testing.T) {
|
||||
|
||||
func TestMessage_GetNoAllocs(t *testing.T) {
|
||||
m := New()
|
||||
NewSoftware("c").AddTo(m)
|
||||
NewSoftware("c").AddTo(m) //nolint: errcheck
|
||||
m.WriteHeader()
|
||||
|
||||
t.Run("Default", func(t *testing.T) {
|
||||
allocs := testing.AllocsPerRun(10, func() {
|
||||
m.Get(AttrSoftware)
|
||||
m.Get(AttrSoftware) //nolint: errcheck
|
||||
})
|
||||
if allocs > 0 {
|
||||
t.Error("allocated memory, but should not")
|
||||
@@ -55,7 +55,7 @@ func TestMessage_GetNoAllocs(t *testing.T) {
|
||||
})
|
||||
t.Run("Not found", func(t *testing.T) {
|
||||
allocs := testing.AllocsPerRun(10, func() {
|
||||
m.Get(AttrOrigin)
|
||||
m.Get(AttrOrigin) //nolint: errcheck
|
||||
})
|
||||
if allocs > 0 {
|
||||
t.Error("allocated memory, but should not")
|
||||
|
||||
Reference in New Issue
Block a user