The simple example would contribute to better understanding
what function does.
Change-Id: I36a2952df8b0e1762ec0cd908a867c457f39366e
Reviewed-on: https://go-review.googlesource.com/75970
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
// Output:
// difference = 12h0m0s
}
+
+func ExampleTime_AppendFormat() {
+ t := time.Date(2017, time.November, 4, 11, 0, 0, 0, time.UTC)
+ text := []byte("Time: ")
+
+ text = t.AppendFormat(text, time.Kitchen)
+ fmt.Println(string(text))
+
+ // Output:
+ // Time: 11:00AM
+}