Skip to content

Commit 9978d23

Browse files
committed
format: Fix missing format for float
1 parent 697df64 commit 9978d23

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

common/format/fmt.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ func ToString(messages ...any) string {
4646
output += strconv.FormatInt(int64(message), 10)
4747
case int64:
4848
output += strconv.FormatInt(message, 10)
49+
case float32:
50+
output += strconv.FormatFloat(float64(message), 'f', -1, 32)
51+
case float64:
52+
output += strconv.FormatFloat(message, 'f', -1, 64)
4953
case uintptr:
5054
output += strconv.FormatUint(uint64(message), 10)
5155
case error:

0 commit comments

Comments
 (0)