diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-28 12:27:06 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-29 08:41:30 +0200 |
commit | 51a410523acd4687a91ff6b48e05a4c7d711126a (patch) | |
tree | 1c3e6059569376c72336ba09f06e9a5ee5e1e833 /version/version.go | |
parent | go.mod: use forked winio with no thirdparty deps (diff) | |
download | wireguard-windows-51a410523acd4687a91ff6b48e05a4c7d711126a.tar.xz wireguard-windows-51a410523acd4687a91ff6b48e05a4c7d711126a.zip |
updater: add initial skeleton
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'version/version.go')
-rw-r--r-- | version/version.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/version/version.go b/version/version.go new file mode 100644 index 00000000..951d2731 --- /dev/null +++ b/version/version.go @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. + */ + +package version + +// #include "../version.h" +import "C" +import ( + "fmt" + "golang.zx2c4.com/wireguard/device" + "runtime" +) + +const WireGuardWindowsVersion = C.WIREGUARD_WINDOWS_VERSION + +func UserAgent() string { + return fmt.Sprintf("WireGuard/%s (wireguard-go %s; %s; %s; %s)", WireGuardWindowsVersion, device.WireGuardGoVersion, OsName(), runtime.Version(), runtime.GOARCH) +} |