init
This commit is contained in:
commit
ba9f6d4cc5
33
main.go
Normal file
33
main.go
Normal file
@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
var vers = flag.Bool("version", false, "print version")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *vers {
|
||||
fmt.Println("2.02.0")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
switch arg := flag.Arg(0); arg {
|
||||
case "when":
|
||||
fmt.Println("April 15th, 2020, 7-11PM")
|
||||
case "where":
|
||||
fmt.Println("Art Boutiki\n44 Race St.\nSan Jose, CA")
|
||||
case "who":
|
||||
fmt.Println("Employees on stage\nFriends/family in the audience")
|
||||
case "fineprint":
|
||||
when := "February 3rd"
|
||||
fmt.Printf("8 bands\n$100/band\nsignup begins %v\nPayment due at signup\n", when)
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "botb: unknown subcommand %v\n", arg)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user