getopt-golang

module
v0.0.0-...-04f0340 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: MIT

README

getopt-golang

Build Status Coverage Status

getopt-golang is a library for command-line argument processing. It is a conversion of GetOpt.PHP.

https://github.com/getopt-php/getopt-php

Features

  • Supports both short (eg. -v) and long (eg. --version) options
  • Option aliasing, ie. an option can have both a long and a short version
  • Cumulative short options (eg. -vvv)
  • Two alternative notations for long options with arguments: --option value and --option=value
  • Collapsed short options (eg. -abc instead of -a -b -c), also with an argument for the last option (eg. -ab 1 instead of -a -b 1)
  • Two alternative notations for short options with arguments: -o value and -ovalue
  • Quoted arguments (eg. --path "/some path/with spcaces") for string processing
  • Options with multiple arguments (eg. --domain example.org --domain example.com)
  • Operand (positional arguments) specification, validation and limitation
  • Command routing with specified options and operands
  • Help text generation
  • Default argument values
  • Argument validation

License

GetOpt-Golang is published under the MIT License.

Directories

Path Synopsis
errors
Package errors implements functions to manipulate errors.
Package errors implements functions to manipulate errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL