```go
package main
import (
"time"
"fmt"
)
func main() {
for {
t := time.Now()
fmt.Printf("%s\n", t)
time.Sleep(1 * time.Second)
}
}
```
```
2017-09-10 17:37:50.53011 +0800 CST m=+0.001002600
...
2017-09-10 17:37:51.5331888 +0800 CST m=+1.004081400
2017-09-10 17:37:57.5359402 +0800 CST m=+7.006832800
2017-09-10 17:37:58.536241 +0800 CST m=+8.007133600
2017-09-10 17:37:59.5363434 +0800 CST m=+9.007236000
```
直接 %s 输出的时候,会类似第一行和最后一行,秒之后的字段,长度不统一,不知为何,在代码是体现在哪里
有疑问加站长微信联系(非本文作者)