From 15982a68f7580370e36f68577b0ad00a62036df1 Mon Sep 17 00:00:00 2001 From: Songmu Date: Wed, 13 Jul 2016 10:12:17 +0900 Subject: [PATCH] logtime --- example_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example_test.go b/example_test.go index 5dcca23..6b2652e 100644 --- a/example_test.go +++ b/example_test.go @@ -9,7 +9,7 @@ import ( ) type log struct { - Time LogTime + Time logTime Host net.IP Req string Status int @@ -22,11 +22,11 @@ type log struct { const timeFormat = "2006-01-02T15:04:05Z07:00" -type LogTime struct { +type logTime struct { time.Time } -func (lt *LogTime) UnmarshalText(t []byte) error { +func (lt *logTime) UnmarshalText(t []byte) error { ti, err := time.ParseInLocation(timeFormat, string(t), time.UTC) if err != nil { return err @@ -49,7 +49,7 @@ func ExampleUnmarshal() { pretty.Println(l) // Output: // ltsv_test.log{ - // Time: ltsv_test.LogTime{ + // Time: ltsv_test.logTime{ // Time: time.Time{ // sec: 63603932404, // nsec: 0,