Skip to content

Commit

Permalink
Merge pull request #8 from bayashi/improve-report-for-error-type
Browse files Browse the repository at this point in the history
`%+v` is better to show for error type than `%#v`
  • Loading branch information
bayashi committed Dec 14, 2023
2 parents a253b66 + edd139e commit 0613c5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions obj/obj.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (o *Object) AsString() string {
return fmt.Sprintf("%d", o.value)
case float32, float64, complex64, complex128:
return fmt.Sprintf("%g", o.value)
case error:
return fmt.Sprintf("%+v", o.value)
default:
return fmt.Sprintf("%#v", o.value)
}
Expand Down

0 comments on commit 0613c5a

Please sign in to comment.