chore: make error clearer (#1514)

This commit is contained in:
chenquan
2022-02-09 00:40:05 -06:00
committed by GitHub
parent 822ee2e1c5
commit 9c2c90e533
4 changed files with 18 additions and 5 deletions

View File

@@ -51,5 +51,5 @@ func unmarshalUseNumber(decoder *json.Decoder, v interface{}) error {
}
func formatError(v string, err error) error {
return fmt.Errorf("string: `%s`, error: `%s`", v, err.Error())
return fmt.Errorf("string: `%s`, error: `%w`", v, err)
}