Params map has string as key
authorbep <bjorn.erik.pedersen@gmail.com>
Tue, 4 Nov 2014 16:43:14 +0000 (17:43 +0100)
committerspf13 <steve.francia@gmail.com>
Thu, 13 Nov 2014 17:41:00 +0000 (12:41 -0500)
Related to issue #540 and commit 3c22ca7c84456b19f2a017719b1533902594e672

commands/version.go

index c65e74f87b0de10915463c5f4cab19d8be301ccf..0ce73c4d690c4930ca3f40be2da4d816c7fc0ba2 100644 (file)
@@ -54,7 +54,7 @@ var version = &cobra.Command{
 
 // setBuildDate checks the ModTime of the Hugo executable and returns it as a
 // formatted string.  This assumes that the executable name is Hugo, if it does
-// not exist, an empty string will be returned.  This is only called if the 
+// not exist, an empty string will be returned.  This is only called if the
 // buildDate wasn't set during compile time.
 //
 // osext is used for cross-platform.
@@ -88,11 +88,10 @@ func getDateFormat() string {
        if params == nil {
                return time.RFC3339
        }
-       parms := params.(map[interface{}]interface{})
+       parms := params.(map[string]interface{})
        layout := parms["DateFormat"]
        if layout == nil || layout == "" {
                return time.RFC3339
        }
        return layout.(string)
 }
-