Commit c37c3134 authored by Audrius Butkevicius's avatar Audrius Butkevicius

Read global options from the enviroment

parent 2867d0a5
......@@ -17,24 +17,28 @@ func main() {
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "endpoint, e",
Value: "http://127.0.0.1:8080",
Usage: "End point to connect to",
Name: "endpoint, e",
Value: "http://127.0.0.1:8080",
Usage: "End point to connect to",
EnvVar: "STENDPOINT",
},
cli.StringFlag{
Name: "apikey, k",
Value: "",
Usage: "API Key",
Name: "apikey, k",
Value: "",
Usage: "API Key",
EnvVar: "STAPIKEY",
},
cli.StringFlag{
Name: "username, u",
Value: "",
Usage: "Username",
Name: "username, u",
Value: "",
Usage: "Username",
EnvVar: "STUSERNAME",
},
cli.StringFlag{
Name: "password, p",
Value: "",
Usage: "Password",
Name: "password, p",
Value: "",
Usage: "Password",
EnvVar: "STPASSWORD",
},
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment