From cf4665caf76d5a0b35491849395f3c0df9fbb0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Einarson?= Date: Tue, 10 Sep 2024 23:13:05 +0200 Subject: [PATCH] chore: fix new golangci-lint issues --- cmd/mp4ff-pslister/main.go | 2 +- mp4/file_test.go | 2 +- mp4/helpers_test.go | 2 +- mp4/pssh_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mp4ff-pslister/main.go b/cmd/mp4ff-pslister/main.go index accbbed4..f3e8945d 100644 --- a/cmd/mp4ff-pslister/main.go +++ b/cmd/mp4ff-pslister/main.go @@ -392,7 +392,7 @@ func printPS(name string, nr int, ps []byte, psInfo interface{}, verbose bool) { if verbose && psInfo != nil { jsonPS, err := json.MarshalIndent(psInfo, "", " ") if err != nil { - log.Fatalf(err.Error()) + log.Fatalln(err.Error()) } fmt.Printf("%s\n", string(jsonPS)) } diff --git a/mp4/file_test.go b/mp4/file_test.go index 99bcb149..8aec4a55 100644 --- a/mp4/file_test.go +++ b/mp4/file_test.go @@ -54,7 +54,7 @@ func TestDecodeFileWithNoLazyMdatOption(t *testing.T) { if frag.Mdat.lazyDataSize != 0 { t.Error("decLazyDataSize is expected to be 0") } - if frag.Mdat.Data == nil || len(frag.Mdat.Data) == 0 { + if len(frag.Mdat.Data) == 0 { t.Error("Mdat Data is expected to be non-nil") } } diff --git a/mp4/helpers_test.go b/mp4/helpers_test.go index 4b09f46f..d2b83298 100644 --- a/mp4/helpers_test.go +++ b/mp4/helpers_test.go @@ -124,7 +124,7 @@ func assertNoError(t *testing.T, err error) { func assertError(t *testing.T, err error, msg string) { t.Helper() if err == nil { - t.Errorf(msg) + t.Error(msg) } } diff --git a/mp4/pssh_test.go b/mp4/pssh_test.go index 34a58cdd..407fe8a7 100644 --- a/mp4/pssh_test.go +++ b/mp4/pssh_test.go @@ -26,7 +26,7 @@ func TestPsshFromBase64(t *testing.T) { d := deep.Equal(buf.String(), expected) if len(d) > 0 { for _, l := range d { - t.Errorf(l) + t.Error(l) } } }