Created
August 14, 2016 14:36
-
-
Save cgyy/5968f47f63fc02af138c1c0937d6df7a to your computer and use it in GitHub Desktop.
This file contains 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" | |
"os" | |
) | |
func main() { | |
var ( | |
env string | |
port int64 | |
migrate bool | |
) | |
flag.StringVar(&env, "env", "development", "http server run mode") | |
flag.Int64Var(&port, "port", 5000, "http srver port") | |
flag.BoolVar(&migrate, "migrate", false, "run database migrate") | |
flag.Parse() | |
fmt.Println(os.Args) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment