// main.go - Main application entry point package main import ( "encoding/json" "flag" "fmt" "os" ) func main() { location := flag.String("place", "Helsinki", "Location for the forecast") flag.Parse() // Create client and get forecast client := NewFMIClient() response, err := client.GetForecast(*location) if err != nil { fmt.Fprintf(os.Stderr, "Error: %v\n", err) os.Exit(1) } // Output JSON jsonData, err := json.MarshalIndent(response, "", " ") if err != nil { fmt.Fprintf(os.Stderr, "Error marshaling JSON: %v\n", err) os.Exit(1) } fmt.Println(string(jsonData)) }