diff --git a/kenall.go b/kenall.go index f7b46f4..15879c8 100644 --- a/kenall.go +++ b/kenall.go @@ -34,7 +34,7 @@ type ( } Option func(*Client) Response struct { - Version *Version `json:"version"` + Version Version `json:"version"` Addresses []*Address `json:"data"` } Version time.Time diff --git a/kenall_test.go b/kenall_test.go index b26ada9..d7717d6 100644 --- a/kenall_test.go +++ b/kenall_test.go @@ -131,8 +131,11 @@ func ExampleClient_Get() { } addr := res.Addresses[0] + fmt.Println(time.Time(res.Version).IsZero()) fmt.Println(addr.Prefecture, addr.City, addr.Town) - // Output: 東京都 千代田区 千代田 + // Output: + // false + // 東京都 千代田区 千代田 } func runTestingServer(t *testing.T) *httptest.Server {