diff options
Diffstat (limited to 'hugolib/hugo.go')
-rw-r--r-- | hugolib/hugo.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/hugolib/hugo.go b/hugolib/hugo.go index 3e4d02039..b90373b3c 100644 --- a/hugolib/hugo.go +++ b/hugolib/hugo.go @@ -17,14 +17,11 @@ type HugoInfo struct { BuildDate string } -func getHugoInfo() *HugoInfo { - if hugoInfo == nil { - hugoInfo = &HugoInfo{ - Version: Version, - CommitHash: CommitHash, - BuildDate: BuildDate, - Generator: `<meta name="generator" content="Hugo ` + Version + `" />`, - } +func init() { + hugoInfo = &HugoInfo{ + Version: Version, + CommitHash: CommitHash, + BuildDate: BuildDate, + Generator: `<meta name="generator" content="Hugo ` + Version + `" />`, } - return hugoInfo } |