// It can be any string, but it will be all lower case.
Environment string
+ // version of go that the Hugo binary was built with
+ GoVersion string
+
deps []*Dependency
}
var (
commitHash string
buildDate string
+ goVersion string
)
bi := getBuildInfo()
if bi != nil {
commitHash = bi.Revision
buildDate = bi.RevisionTime
+ goVersion = bi.GoVersion
}
return Info{
BuildDate: buildDate,
Environment: environment,
deps: deps,
+ GoVersion: goVersion,
}
}
if bi != nil {
c.Assert(hugoInfo.CommitHash, qt.Equals, bi.Revision)
c.Assert(hugoInfo.BuildDate, qt.Equals, bi.RevisionTime)
+ c.Assert(hugoInfo.GoVersion, qt.Equals, bi.GoVersion)
}
c.Assert(hugoInfo.Environment, qt.Equals, "production")
c.Assert(string(hugoInfo.Generator()), qt.Contains, fmt.Sprintf("Hugo %s", hugoInfo.Version()))
hugo.Version
: the current version of the Hugo binary you are using e.g. `0.63.2`
-
-`hugo` returns an instance that contains the following functions:
+hugo.GoVersion
+: returns the version of Go that the Hugo binary was built with. {{< new-in "0.101.0" >}}
hugo.Environment
: the current running environment as defined through the `--environment` cli tag
hugo.Deps
: See [hugo.Deps](#hugodeps)
-
## hugo.Deps
{{< new-in "0.92.0" >}}
{{ end }}
</tbody>
</table>
-```
\ No newline at end of file
+```