diff --git a/format.go b/format.go index 9d59883..3aea01f 100644 --- a/format.go +++ b/format.go @@ -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)) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5b03064 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/cockroachdb/apd + +require github.com/pkg/errors v0.8.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..3dfe462 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=