aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-21 22:20:42 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-21 22:20:42 +0200
commit0179262628cadd3ed402880a03f3d812f327feec (patch)
tree32c193f533087edf0916d11d61e0fa33172f8961 /internal/config
parent89f46e31998dd62a52d7dd07b16f1d81d9597e3e (diff)
downloadfeed2imap-go-0179262628cadd3ed402880a03f3d812f327feec.tar.gz
feed2imap-go-0179262628cadd3ed402880a03f3d812f327feec.tar.bz2
feed2imap-go-0179262628cadd3ed402880a03f3d812f327feec.zip
Improved HTML creation
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go9
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 {