codegangsta/cli — pull request #77 by xyproto (2014-04-10 14:23:30+00:00)
Title: Mainly nitpicking

Hi!

Accept or reject at will. (Or ask for modifications to the modifications).

* Restructured the code to list types first, then variables, then functions.
* Tried to make the comments more consistent.
* Plenty of nitpicky and subjective newline additions and removals.
* Ran go fmt.
* Introduced the `FlagTestBool` and `FlagTestString` types, to shorten the code used for testing.
* Made the lookup functions one level less nested by first checking for the bailout condition and then bailing out instead of having an if check in an if check.
* Added a `mapS` function that maps a function over a string slice, so that whitespace does not have to be stripped twice from the `parts` variable in `normalizeFlags`. (No need for `name = strings.Trim(name, " ")` anymore).
* All tests pass.

Best regards,
Alexander Rødseth