Skip to content

Commit deba00b

Browse files
committed
Fix build with Go 1.24
Go 1.24 provides stricter checking that forbids passing a variable as a format string to Printf-like functions with no other arguments. Remove instances of this. See also: https://tip.golang.org/doc/go1.24#vet Signed-off-by: W. Michael Petullo <[email protected]>
1 parent 3045bdf commit deba00b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

azuredevops/models_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestModels_Unmarshal_Time(t *testing.T) {
2727

2828
parsedTime, err := time.Parse(time.RFC3339Nano, "2019-09-01T00:07:26Z")
2929
if err != nil {
30-
t.Errorf(err.Error())
30+
t.Error(err.Error())
3131
}
3232
if testModel.Time2.Time != parsedTime {
3333
t.Errorf("Expected time: %v Actual time: %v", parsedTime, testModel.Time2.Time)
@@ -46,13 +46,13 @@ func TestModels_Marshal_Unmarshal_Time(t *testing.T) {
4646
testModel1.Time1.Time = time.Now()
4747
b, err := json.Marshal(testModel1)
4848
if err != nil {
49-
t.Errorf(err.Error())
49+
t.Error(err.Error())
5050
}
5151

5252
testModel2 := TestModel{}
5353
err = json.Unmarshal(b, &testModel2)
5454
if err != nil {
55-
t.Errorf(err.Error())
55+
t.Error(err.Error())
5656
}
5757

5858
if testModel1.Time1 != testModel1.Time1 {

0 commit comments

Comments
 (0)