mirror of
https://git.zx2c4.com/wireguard-windows
synced 2024-11-10 16:59:18 +00:00
6ed37f30f5
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
27 lines
425 B
Go
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())
|
|
}
|