如何在golang中添加1秒的日期?我有:
t := time.Now().Format("2006/02/01 03:04:05")
并希望像下面这样的东西,但到目前为止得到不匹配的类型字符串和time.Duration错误
t1, t2, t3 = t + 1*time.Second, t+3*time.Second, t+2*time.Second
Jakub M... 7
func (t Time) Add(d Duration) Time
https://golang.org/pkg/time/#Time.Add
func (t Time) Add(d Duration) Time
https://golang.org/pkg/time/#Time.Add