diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-24 01:52:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-24 02:25:36 +0200 |
commit | 4a9de3218e6445742f29fef06f8b2f1dcef6306f (patch) | |
tree | 0c5ed4576b7d59c696f567530f6b7cb96f56f490 /main.go | |
parent | 28a167e8288b6dc6c10d9c5d1c1661ba64a6c835 (diff) |
Add undocumented --version flag
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |