github.com/rentongzhang/docker@v1.8.2-rc1/pkg/mflag/README.md (about)

     1  Package mflag (aka multiple-flag) implements command-line flag parsing.  
     2  It's an **hacky** fork of the [official golang package](http://golang.org/pkg/flag/)
     3  
     4  It adds:
     5  
     6  * both short and long flag version  
     7  `./example -s red` `./example --string blue`
     8  
     9  * multiple names for the same option  
    10  ```
    11  $>./example -h
    12  Usage of example:
    13    -s, --string="": a simple string
    14  ```
    15  
    16  ___
    17  It is very flexible on purpose, so you can do things like:  
    18  ```
    19  $>./example -h
    20  Usage of example:
    21    -s, -string, --string="": a simple string
    22  ```
    23  
    24  Or:  
    25  ```
    26  $>./example -h
    27  Usage of example:
    28    -oldflag, --newflag="": a simple string
    29  ```
    30  
    31  You can also hide some flags from the usage, so if we want only `--newflag`:  
    32  ```
    33  $>./example -h
    34  Usage of example:
    35    --newflag="": a simple string
    36  $>./example -oldflag str
    37  str
    38  ```
    39  
    40  See [example.go](example/example.go) for more details.