Created
July 22, 2016 21:58
-
-
Save luismoramedina/b398350aabfcada0f830a067985e1977 to your computer and use it in GitHub Desktop.
go command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
) | |
func main() { | |
var cmd string | |
var i bool | |
flag.StringVar(&cmd, "cmd", cmd, `cmd`) | |
flag.BoolVar(&i, "i", i, `i bool`) | |
flag.Parse() | |
fmt.Println(i) | |
fmt.Println(flag.Args()) | |
fmt.Println(cmd) | |
flag.Usage() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment