From 5773df6f6ca330d25a790df0b8bf5ab23a4b23f9 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 16 Jan 2020 10:42:03 +0300 Subject: [PATCH] Merge: + --version: Show the version and exit Close #1285 Squashed commit of the following: commit fdc616f38651f9fcc16442003bd15adb88e2c2b1 Author: Simon Zolin Date: Wed Jan 15 18:46:00 2020 +0300 minor commit 6f5a22c86e5fe76c3959343a8077d3997ff0707d Author: Simon Zolin Date: Mon Dec 30 19:19:30 2019 +0300 + --version: Show the version and exit --- home/home.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/home.go b/home/home.go index 44fbe855..b965b74c 100644 --- a/home/home.go +++ b/home/home.go @@ -473,6 +473,10 @@ func loadOptions() options { {"check-config", "", "Check configuration and exit", nil, func() { o.checkConfig = true }}, {"no-check-update", "", "Don't check for updates", nil, func() { o.disableUpdate = true }}, {"verbose", "v", "Enable verbose output", nil, func() { o.verbose = true }}, + {"version", "", "Show the version and exit", nil, func() { + fmt.Printf("AdGuardHome %s\n", versionString) + os.Exit(0) + }}, {"help", "", "Print this help", nil, func() { printHelp() os.Exit(64)