merge: fixed conflicts in discord PR

This commit is contained in:
Torkel Ödegaard
2018-05-07 15:40:43 +02:00
6 changed files with 259 additions and 19 deletions
+9
View File
@@ -106,6 +106,15 @@ func (f Float) String() string {
return fmt.Sprintf("%1.3f", f.Float64)
}
// FullString returns float as string in full precision
func (f Float) FullString() string {
if !f.Valid {
return "null"
}
return fmt.Sprintf("%f", f.Float64)
}
// SetValid changes this Float's value and also sets it to be non-null.
func (f *Float) SetValid(n float64) {
f.Float64 = n