[**CLI**](https://github.com/mkideal/cli)是一个非常小巧,便于使用且功能丰富的用于构建命令行程序的库。为了让大家更加容易上手,特此撰写了二十几个程序示例。每个示例都非常简单,通常只用来阐明一个特性的使用方法。
* [Example 1: Hello world](http://www.mkideal.com/golang/cli-examples.html#example-1-hello)
* [Example 2: How to use **flag**](http://www.mkideal.com/golang/cli-examples.html#example-2-flag)
* [Example 3: How to use **required** flag](http://www.mkideal.com/golang/cli-examples.html#example-3-required-flag)
* [Example 4: How to use **default** flag](http://www.mkideal.com/golang/cli-examples.html#example-4-default-flag)
* [Example 5: How to use **slice**](http://www.mkideal.com/golang/cli-examples.html#example-5-slice)
* [Example 6: How to use **map**](http://www.mkideal.com/golang/cli-examples.html#example-6-map)
* [Example 7: Usage of **force** flag](http://www.mkideal.com/golang/cli-examples.html#example-7-force-flag)
* [Example 8: Usage of **child command**](http://www.mkideal.com/golang/cli-examples.html#example-8-child-command)
* [Example 9: **Auto help**](http://www.mkideal.com/golang/cli-examples.html#example-9-auto-help)
* [Example 10: Usage of **Validator**](http://www.mkideal.com/golang/cli-examples.html#example-10-usage-of-validator)
* [Example 11: **Prompt** and **Password**](http://www.mkideal.com/golang/cli-examples.html#example-11-prompt-and-password)
* [Example 12: How to use **Decoder**](http://www.mkideal.com/golang/cli-examples.html#example-12-decoder)
* [Example 13: Builtin Decoder: **PidFile**](http://www.mkideal.com/golang/cli-examples.html#example-13-pid-file)
* [Example 14: Builtin Decoder: **Time** and **Duration**](http://www.mkideal.com/golang/cli-examples.html#example-14-time-and-duration)
* [Example 15: Builtin Decoder: **File**](http://www.mkideal.com/golang/cli-examples.html#example-15-file)
* [Example 16: **Parser**](http://www.mkideal.com/golang/cli-examples.html#example-16-parser)
* [Example 17: Builtin Parser: **JSONFileParser**](http://www.mkideal.com/golang/cli-examples.html#example-17-json-file)
* [Example 18: How to use **custom parser**](http://www.mkideal.com/golang/cli-examples.html#example-18-custom-parser)
* [Example 19: How to use **Hooks**](http://www.mkideal.com/golang/cli-examples.html#example-19-hooks)
* [Example 20: How to use **Daemon**](http://www.mkideal.com/golang/cli-examples.html#example-20-daemon)
* [Example 21: How to use **Editor**](http://www.mkideal.com/golang/cli-examples.html#example-21-editor)
* [Example 22: Custom **Editor**](http://www.mkideal.com/golang/cli-examples.html#example-22-custom-editor)
有疑问加站长微信联系(非本文作者)