akamensky / argparse

Argparse for golang. Just because `flag` sucks
MIT License
611 stars 62 forks source link

Golang Argparse not picking correct value for multiple flags #110

Closed ayub422 closed 2 years ago

ayub422 commented 2 years ago

I have a golang binary named test. I have two flags -p and -s. I want user to pass them like below scenarios: 1) ./test -p 2) ./test -s serviceName 3) ./test -p -s serviceName

Means -p should be passed with empty value and -s should be passed with any service name. 1 and 2 are working fine but in third -p flag is taking value "-s". What i want from 3rd is -p should be empty value ("") and -s should be "serviceName"

akamensky commented 2 years ago

I don't see any question, but report or feature request. Please read documentation all you need to implement this is already well described there.