Created
August 22, 2019 17:57
-
-
Save teivah/bb4fa467006998a8725f05f916ae88d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
t := duration(time.Now(), time.Second) | |
fmt.Printf("%v\n", t) | |
} | |
func duration(now time.Time, d time.Duration) time.Time { | |
return now.Add(d) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment