spf13/hugo — pull request #697 by mohae (2014-12-06 15:23:40+00:00)
Title: add cmdType and constants, modify InitializeConfig calls, don't check...

...for error on initialization of version.

This resolves #695 with the suggested fix. When `hugo version` is run, the error message from Viper will be suppressed. This results in the reported issue being resolved while maintaining the ability to customize the way the compile date is displayed.

This adds the `cmdType` type along with constants and the `String()` func to fulfill the stringer interface. All Hugo command calls to `InitializeConfig()` have been updated to `InitializeConfig(cmdType)` so that Hugo will correctly handle errors from Viper.

These changes do not change the behavior of the updated command, with the exception of `version`.

There is another pull request related to #695: https://github.com/spf13/hugo/pull/696. Either that pull request or this one should be accepted, and not both.