jawher / mow.cli

A versatile library for building CLI applications in Go
MIT License
871 stars 55 forks source link

Request: Long option only. #13

Closed novln closed 9 years ago

novln commented 9 years ago

Hello,

This library is neat, however, it would be perfect if its was possible to declare an option in long format only.

For example using StringOpt:

host := app.String(cli.StringOpt{
    Name:  "host",
    Value: "127.0.0.1",
    Desc:  "Hostname",
    LongOptOnly: true,
})

Thank you in advance.

jawher commented 9 years ago

Hi,

I'm not sure I understand the issue here: if you don't give the option a short name, like you did in the example above, the option can only be set via its long name.

Or am I missing something ?

novln commented 9 years ago

Hello,

No you right, my bad. I was using an old version and the option with only long name was causing panic error - or I was doing something wrong - its working just fine now.

Thank you.