Skip to content

Instantly share code, notes, and snippets.

@teivah
Created August 22, 2019 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teivah/90c140c8ec2cd31fdadeadc5ed32a7b9 to your computer and use it in GitHub Desktop.
Save teivah/90c140c8ec2cd31fdadeadc5ed32a7b9 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
t := duration(time.Second)
fmt.Printf("%v\n", t)
}
func duration(d time.Duration) time.Time {
return time.Now().Add(d)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment