diff options
Diffstat (limited to 'vendor/github.com/spf13/cobra/cobra/cmd/licenses.go')
-rw-r--r-- | vendor/github.com/spf13/cobra/cobra/cmd/licenses.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go b/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go index d73e6fb35..cf2a6b7af 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/licenses.go @@ -77,7 +77,11 @@ func getLicense() License { func copyrightLine() string { author := viper.GetString("author") - year := time.Now().Format("2006") + + year := viper.GetString("year") // For tests. + if year == "" { + year = time.Now().Format("2006") + } return "Copyright © " + year + " " + author } |