diff options
Diffstat (limited to '')
-rw-r--r-- | internal/config/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 409cbdf..6c74c2e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -5,6 +5,7 @@ import ( "os" "os/user" "runtime" + "runtime/debug" "strings" ) @@ -62,6 +63,14 @@ func (c *Config) WithPartHtml() bool { return false } +func Version() string { + bi, ok := debug.ReadBuildInfo() + if !ok { + return "(unknown)" + } + return bi.Main.Version +} + func hostname() (hostname string) { hostname, err := os.Hostname() if err != nil { |