-
Notifications
You must be signed in to change notification settings - Fork 107
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
boolean options don't seem to work #73
Comments
You are using a tab between
If you replace the tab with two (or more) spaces, it works: package main
import (
"fmt"
"github.com/docopt/docopt-go"
)
var usage string = `
Mytest.
Usage:
mytest [options]
Options:
--flag a flag
`
func main() {
opts, _ := docopt.ParseDoc(usage)
flag, err := opts.Bool("--flag")
fmt.Println(flag)
fmt.Println(err)
} $ go run mytest.go
false
<nil>
$ go run mytest.go --flag
true
<nil> |
@tmbdev it looks like that this ticket can be closed? |
Wouldn't it make sense to permit tabs?
…On Thu, Nov 30, 2023, 01:49 Marco Molteni ***@***.***> wrote:
@tmbdev <https://github.com/tmbdev> it looks like that this ticket can be
closed?
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRQPZ7LTTSM3RHUPZH4NTYHBJD5AVCNFSM4LSOEOF2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTGM2DENRSHAZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Boolean options don't seem to work the way they should. Here is an example:
The text was updated successfully, but these errors were encountered: