fix wrong error type when formatting

pull/8/head
Peter Lee 2018-04-08 16:56:06 +08:00 committed by GitHub
parent bb3887d7dd
commit bc8525dfa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ func Test_toRealServer(t *testing.T) {
for i := range Tests { for i := range Tests {
got, err := toRealServer(&Tests[i].ipvsDestination) got, err := toRealServer(&Tests[i].ipvsDestination)
if err != nil { if err != nil {
t.Errorf("case %d unexpected error: %d", i, err) t.Errorf("case %d unexpected error: %v", i, err)
} }
if !reflect.DeepEqual(*got, Tests[i].realServer) { if !reflect.DeepEqual(*got, Tests[i].realServer) {
t.Errorf("case %d Failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].realServer) t.Errorf("case %d Failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].realServer)
@ -349,7 +349,7 @@ func Test_toIPVSDestination(t *testing.T) {
for i := range Tests { for i := range Tests {
got, err := toIPVSDestination(&Tests[i].realServer) got, err := toIPVSDestination(&Tests[i].realServer)
if err != nil { if err != nil {
t.Errorf("case %d unexpected error: %d", i, err) t.Errorf("case %d unexpected error: %v", i, err)
} }
if !reflect.DeepEqual(*got, Tests[i].ipvsDestination) { if !reflect.DeepEqual(*got, Tests[i].ipvsDestination) {
t.Errorf("case %d failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].ipvsDestination) t.Errorf("case %d failed to translate Destination - got %#v, want %#v", i, *got, Tests[i].ipvsDestination)