You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
647 B

  1. package main
  2. import (
  3. "flag"
  4. "fmt"
  5. "os"
  6. )
  7. var vers = flag.Bool("version", false, "print version")
  8. func main() {
  9. flag.Parse()
  10. if *vers {
  11. fmt.Println("2.02.0")
  12. os.Exit(0)
  13. }
  14. switch arg := flag.Arg(0); arg {
  15. case "when":
  16. fmt.Println("April 15th, 2020, 7-11PM")
  17. case "where":
  18. fmt.Println("Art Boutiki\n44 Race St.\nSan Jose, CA")
  19. case "who":
  20. fmt.Println("Employees on stage\nFriends/family in the audience")
  21. case "fineprint":
  22. when := "February 3rd"
  23. fmt.Printf("8 bands\n$100/band\nsignup begins %v\nPayment due at signup\n", when)
  24. default:
  25. fmt.Fprintf(os.Stderr, "botb: unknown subcommand %v\n", arg)
  26. os.Exit(1)
  27. }
  28. }