func main() { flag.Parse() var client *maps.Client var err error if *apiKey != "" { client, err = maps.NewClient(maps.WithAPIKey(*apiKey)) } else if *clientID != "" || *signature != "" { client, err = maps.NewClient(maps.WithClientIDAndSignature(*clientID, *signature)) } else { usageAndExit("Please specify an API Key, or Client ID and Signature.") } check(err) t, err := strconv.Atoi(*timestamp) check(err) r := &maps.TimezoneRequest{ Language: *language, Timestamp: time.Unix(int64(t), 0), } parseLocation(*location, r) resp, err := client.Timezone(context.Background(), r) check(err) pretty.Println(resp) }