burke/zeus — pull request #440 by dylanahsmith (2013-12-11 05:20:23+00:00)
Title: Fix version option.

## Problem

```
zeus --version
```

opens the man page rather than printing the version, even though the code intends to support this option.

This happens because the loop to handle options doesn't check for `--version`, ignores unknown options, and consumes those options. So, the following [`if len(Args) == 0` condition](https://github.com/burke/zeus/blob/master/go/cmd/zeus/zeus.go#L51) is true, and the man page is opened, before the check for `Args[0] == "--version"`.

## Solution

Check for the version option in the loop with the other options. Extract the logic to a function to avoid duplication.