Skip to content

Commit

Permalink
linter: non-constant format string in Errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
gaissmai committed Dec 14, 2024
1 parent dde4879 commit 051d7b5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bitset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1530,13 +1530,13 @@ func TestMarshalUnmarshalBinaryByLittleEndian(t *testing.T) {
func copyBinary(t *testing.T, from encoding.BinaryMarshaler, to encoding.BinaryUnmarshaler) {
data, err := from.MarshalBinary()
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

err = to.UnmarshalBinary(data)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}
}
Expand All @@ -1547,14 +1547,14 @@ func TestMarshalUnmarshalJSON(t *testing.T) {
a.Set(10).Set(1001)
data, err := json.Marshal(a)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

b := new(BitSet)
err = json.Unmarshal(data, b)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

Expand All @@ -1568,14 +1568,14 @@ func TestMarshalUnmarshalJSON(t *testing.T) {
a := New(1010).Set(10).Set(1001)
data, err := json.Marshal(a)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

b := new(BitSet)
err = json.Unmarshal(data, b)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

Expand All @@ -1591,7 +1591,7 @@ func TestMarshalUnmarshalJSONWithTrailingData(t *testing.T) {
a := New(1010).Set(10).Set(1001)
data, err := json.Marshal(a)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

Expand All @@ -1602,7 +1602,7 @@ func TestMarshalUnmarshalJSONWithTrailingData(t *testing.T) {
b := new(BitSet)
err = json.Unmarshal(data, b)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

Expand All @@ -1619,14 +1619,14 @@ func TestMarshalUnmarshalJSONByStdEncoding(t *testing.T) {
a := New(1010).Set(10).Set(1001)
data, err := json.Marshal(a)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

b := new(BitSet)
err = json.Unmarshal(data, b)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
return
}

Expand Down

0 comments on commit 051d7b5

Please sign in to comment.