Skip to content

Commit

Permalink
Specify that 'g' avoids the 'f' ambiguity
Browse files Browse the repository at this point in the history
Fixes #74
  • Loading branch information
maddyblue committed Oct 17, 2018
1 parent a24032b commit dab2ab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion format.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import (
// If format is a different character, Text returns a "%" followed by the
// unrecognized.Format character. The 'f' format has the possibility of
// displaying precision that is not present in the Decimal when it appends
// zeros. All other formats always show the exact precision of the Decimal.
// zeros (the 'g' format avoids the use of 'f' in this case). All other
// formats always show the exact precision of the Decimal.
func (d *Decimal) Text(format byte) string {
cap := 10 // TODO(gri) determine a good/better value here
return string(d.Append(make([]byte, 0, cap), format))
Expand Down

0 comments on commit dab2ab1

Please sign in to comment.