]> git.scottworley.com Git - planeteer/commitdiff
UI: Explain required usage when run without args
authorScott Worley <sworley@chkno.net>
Tue, 29 Nov 2011 15:30:32 +0000 (07:30 -0800)
committerScott Worley <sworley@chkno.net>
Tue, 29 Nov 2011 15:30:32 +0000 (07:30 -0800)
planeteer.go

index cfde30f1cca565d37f7fdaba68323ee62d6800a9..67a843dd400c9ca3d8e708af48d0850442b91c4f 100644 (file)
@@ -648,6 +648,10 @@ func IndexCommodities(m *map[string]Commodity, start_at int) (map[string]int, []
 
 func main() {
        flag.Parse()
+       if *start == "" || *funds == 0 {
+               print("--start and --funds are required.  --help for more\n")
+               return
+       }
        if *cpuprofile != "" {
                f, err := os.Create(*cpuprofile)
                if err != nil {