Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flag var #21

Merged
merged 6 commits into from
Jul 21, 2015
Merged

Use flag var #21

merged 6 commits into from
Jul 21, 2015

Conversation

tcnksm
Copy link
Owner

@tcnksm tcnksm commented Jul 21, 2015

Use flag.Var (This is just my preference),

$ make build && ./bin/gcli new -F flag -f file:string -f worker:int -f debug:bool test

This will generate,

var (
         file   string
         worker int
         debug  bool
)

flags.StringVar(&file, "file", "", "")
flags.IntVar(&worker, "worker", 0, "")
flags.BoolVar(&debug, "debug", false, "")

tcnksm added a commit that referenced this pull request Jul 21, 2015
@tcnksm tcnksm merged commit 49bf356 into master Jul 21, 2015
@tcnksm tcnksm deleted the use-flag-var branch October 7, 2015 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant