Skip to content

Use flag var - #21

Merged
tcnksm merged 6 commits into
masterfrom
use-flag-var
Jul 21, 2015
Merged

tcnksm merged 6 commits into
masterfrom
use-flag-var

Conversation

@tcnksm

@tcnksm tcnksm commented Jul 21, 2015

Copy link
Copy Markdown
Owner

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

⌂ 换网址