summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.go b/main.go
index 146a814..503d4ff 100644
--- a/main.go
+++ b/main.go
@@ -16,6 +16,8 @@
package main
import (
+ "flag"
+ "fmt"
"log"
"os"
@@ -29,9 +31,17 @@ const (
applicationName = "RiseupVPN"
)
+var version string
var printer *message.Printer
func main() {
+ versionFlag := flag.Bool("version", false, "Version of the bitmask-systray")
+ flag.Parse()
+ if *versionFlag {
+ fmt.Println(version)
+ os.Exit(0)
+ }
+
if _, err := os.Stat(bitmask.ConfigPath); os.IsNotExist(err) {
os.MkdirAll(bitmask.ConfigPath, os.ModePerm)
}