Skip to content

Commit

Permalink
adjust test
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Jun 17, 2017
1 parent 8f2bae0 commit 5a070da
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions example_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ltsv_test

import (
"fmt"
"net"
"time"

Expand All @@ -9,7 +10,7 @@ import (
)

type log struct {
Time logTime
Time *logTime
Host net.IP
Req string
Status int
Expand Down Expand Up @@ -46,27 +47,14 @@ func ExampleUnmarshal() {
"vhost:mackerel.io"
l := log{}
ltsv.Unmarshal([]byte(ltsvLog), &l)
t := l.Time
l.Time = nil
fmt.Println(t)
pretty.Println(l)
// Output:
// 2016-07-13 00:00:04 +0900 +0900
// ltsv_test.log{
// Time: ltsv_test.logTime{
// Time: time.Time{
// sec: 63603932404,
// nsec: 0,
// loc: &time.Location{
// name: "",
// zone: {
// {name:"", offset:32400, isDST:false},
// },
// tx: {
// {when:-9223372036854775808, index:0x0, isstd:false, isutc:false},
// },
// cacheStart: -9223372036854775808,
// cacheEnd: 9223372036854775807,
// cacheZone: &time.zone{(CYCLIC REFERENCE)},
// },
// },
// },
// Time: (*ltsv_test.logTime)(nil),
// Host: {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xc0, 0x0, 0x2, 0x1},
// Req: "POST /api/v0/tsdb HTTP/1.1",
// Status: 200,
Expand Down

0 comments on commit 5a070da

Please sign in to comment.