Skip to content

Commit b84dcb8

Browse files
committed
Merge branch 'command_line_use' of https://github.com/Aashna-Agrawal/golang-examples into command_line_use
2 parents 5294f2f + a0c0aeb commit b84dcb8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

advanced/command_line_arguments.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
func main() {
99
env := flag.String("env", "dev", "Environment(dev, qa, stg, prod)")
1010
cron := flag.Bool("consumer", false, "boolean")
11+
//Parse parses the command-line flags
1112
flag.Parse()
1213
fmt.Println("The environment set is", *env)
1314
fmt.Println("The consumer flag retrieved from command line is", *cron)

0 commit comments

Comments
 (0)