mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-30 06:12:15 +02:00
style: coed cleanup and fix styling
This commit is contained in:
@@ -26,11 +26,11 @@ func AppendDuration(d time.Duration, buf []byte) []byte {
|
||||
|
||||
switch {
|
||||
case d < time.Millisecond:
|
||||
buf = strconv.AppendInt(buf, int64(d.Nanoseconds()), 10)
|
||||
buf = strconv.AppendInt(buf, d.Nanoseconds(), 10)
|
||||
buf = append(buf, []byte(" ns")...)
|
||||
return buf
|
||||
case d < time.Second:
|
||||
buf = strconv.AppendInt(buf, int64(d.Milliseconds()), 10)
|
||||
buf = strconv.AppendInt(buf, d.Milliseconds(), 10)
|
||||
buf = append(buf, []byte(" ms")...)
|
||||
return buf
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user