aboutsummaryrefslogtreecommitdiffstats
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
parentEye before ee except after see (diff)
downloadwireguard-go-4a9de3218e6445742f29fef06f8b2f1dcef6306f.tar.xz
wireguard-go-4a9de3218e6445742f29fef06f8b2f1dcef6306f.zip
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