Use fmt.Errorf() instead of errors.New(fmt.Sprintf())

This commit is contained in:
Damian Gryski 2014-03-07 10:20:39 +01:00
parent 7ea5fa7550
commit ad0d49dcb2
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func getError(data []byte) (err error) {
err = fmt.Errorf("Not a error data: %V", data) err = fmt.Errorf("Not a error data: %V", data)
return return
} }
err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1])) err = fmt.Errorf("%s: %s", rel[0], rel[1])
return return
} }

View File

@ -21,7 +21,7 @@ func getError(data []byte) (err error) {
err = fmt.Errorf("Not a error data: %V", data) err = fmt.Errorf("Not a error data: %V", data)
return return
} }
err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1])) err = fmt.Errorf("%s: %s", rel[0], rel[1])
return return
} }