Skip to content

Instantly share code, notes, and snippets.

@rbanffy
Created July 17, 2013 10:54
Show Gist options
  • Save rbanffy/6019557 to your computer and use it in GitHub Desktop.
Save rbanffy/6019557 to your computer and use it in GitHub Desktop.
package main
import (
"flag"
"fmt"
)
var start string
func init() {
flag.StringVar(&start, "start", "", "time to start")
flag.Parse()
}
func main() {
fmt.Println("start is ", start)
fmt.Println("Other args below")
for i, arg := range flag.Args() {
fmt.Println(i, arg)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment