1
0
mirror of https://git.zx2c4.com/wireguard-windows synced 2024-11-10 16:59:18 +00:00
wireguard-windows/version/useragent.go
Jason A. Donenfeld 6ed37f30f5 global: bump date
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-01-06 17:28:13 +01:00

27 lines
425 B
Go

/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package version
import (
"fmt"
"runtime"
)
func Arch() string {
switch runtime.GOARCH {
case "arm", "arm64", "amd64":
return runtime.GOARCH
case "386":
return "x86"
default:
panic("Unrecognized GOARCH")
}
}
func UserAgent() string {
return fmt.Sprintf("WireGuard/%s (%s; %s)", Number, OsName(), Arch())
}