package main import ( "fmt" "io" "net/http" ) // Print the current phase of the Moon in standard output // Optional arguments: format func ShowMoonPhases(format string, lang string) { query := "https://wttr.in/" + "moon" + "?" + format + "&lang=" + lang resp, err := http.Get(query) sanityCheck(err) defer resp.Body.Close() body, err := io.ReadAll(resp.Body) sanityCheck(err) fmt.Printf("%s\n", body) }