Use fmt.Errorf() instead of errors.New(fmt.Sprintf())
This commit is contained in:
parent
7ea5fa7550
commit
ad0d49dcb2
@ -22,7 +22,7 @@ func getError(data []byte) (err error) {
|
||||
err = fmt.Errorf("Not a error data: %V", data)
|
||||
return
|
||||
}
|
||||
err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1]))
|
||||
err = fmt.Errorf("%s: %s", rel[0], rel[1])
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ func getError(data []byte) (err error) {
|
||||
err = fmt.Errorf("Not a error data: %V", data)
|
||||
return
|
||||
}
|
||||
err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1]))
|
||||
err = fmt.Errorf("%s: %s", rel[0], rel[1])
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user