pflag
pflag copied to clipboard
Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
We still have an old open issue for our CLI tool which is kind of a cosmetic thing, but it's still annoying and we would really like to have it...
* contributes #385
Support multiple chars shorthand. eg: -ff file --filefrom file some commit cherry-picked from #175 .
Hello I am a bit worried about the very low maintenance activity on this wonderful tool that I am using every day, from viper, cobra or standalone. I know that...
I'm having some trouble passing an element of a map to stringtostring, where the value may or may not contain equal signs, quotes, and/or commas. It seems there is no...
My use case is having parsed command line variables at start-of-day, I need to refer to them later. I can use `pflags.Lookup()` to get a `Value` but this seems to...
This PR implements support for `time.Time` flags which can be used to accept timestamps as input directly (see https://github.com/spf13/cobra/issues/742). The implementation allows defining a list of acceptable timestamp formats which...
Hi I was trying to learn how to use VarP following the Readme, Looks like VarP doesn't take the pointer to the variable anymore as the first parameter. The go-lang...
```python import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='Test Cli') parser.add_argument('--file', '-f', dest='files', nargs='+', type=str, required=False) args = parser.parse_args() print(args) ``` In python, nagrs is convenient for dealing with...