summaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-24 01:52:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-24 02:25:36 +0200
commit4a9de3218e6445742f29fef06f8b2f1dcef6306f (patch)
tree0c5ed4576b7d59c696f567530f6b7cb96f56f490 /main.go
parent28a167e8288b6dc6c10d9c5d1c1661ba64a6c835 (diff)
Add undocumented --version flag
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 29693eb..f21de41 100644
--- a/main.go
+++ b/main.go
@@ -74,6 +74,11 @@ func warning() {
}
func main() {
+ if len(os.Args) == 2 && os.Args[1] == "--version" {
+ fmt.Printf("wireguard-go v%s\n\nUserspace WireGuard daemon for %s-%s.\nInformation available at https://www.wireguard.com.\nCopyright (C) Jason A. Donenfeld <Jason@zx2c4.com>.\n", WireGuardGoVersion, runtime.GOOS, runtime.GOARCH)
+ return
+ }
+
warning()
// parse arguments