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: ``,
- }
+func init() {
+ hugoInfo = &HugoInfo{
+ Version: Version,
+ CommitHash: CommitHash,
+ BuildDate: BuildDate,
+ Generator: ``,
}
- return hugoInfo
}
diff --git a/hugolib/node.go b/hugolib/node.go
index 85cf6aeb6..0c3ed9ce6 100644
--- a/hugolib/node.go
+++ b/hugolib/node.go
@@ -78,7 +78,7 @@ func (n *Node) IsMenuCurrent(menuId string, inme *MenuEntry) bool {
}
func (n *Node) Hugo() *HugoInfo {
- return getHugoInfo()
+ return hugoInfo
}
func (n *Node) isSameAsDescendantMenu(inme *MenuEntry, parent *MenuEntry) bool {