mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-23 10:26:44 +00:00
Add OS to app version
This commit is contained in:
committed by
Michal Horejsek
parent
f888176485
commit
9d50a8cef2
@ -21,6 +21,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/ProtonMail/go-appdir"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
@ -247,3 +248,17 @@ func (c *Config) GetDefaultIMAPPort() int {
|
||||
func (c *Config) GetDefaultSMTPPort() int {
|
||||
return 1025
|
||||
}
|
||||
|
||||
// getAPIOS returns actual operating system.
|
||||
func (c *Config) getAPIOS() string {
|
||||
switch os := runtime.GOOS; os {
|
||||
case "darwin": // nolint: goconst
|
||||
return "macOS"
|
||||
case "linux":
|
||||
return "Linux"
|
||||
case "windows":
|
||||
return "Windows"
|
||||
}
|
||||
|
||||
return "Linux"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user