Files
purpleschool/go-demo-5/main.go
2025-03-20 23:45:11 +03:00

23 lines
541 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
"flag"
"fmt"
"github.com/fatih/color"
)
func main() {
// fmt.Println("Новый проект")
// name := flag.String("name", "Archie", "Имя пользователя")
// age := flag.Int("age", 49, "Возраст пользователя")
color.Green("__ПОГОДА__")
city := flag.String("city", "", "Город пользователя")
format := flag.Int("format", 1, "Формат вывода погоды")
flag.Parse()
fmt.Printf("Город: %s, формат: %d\n", *city, *format)
}