Ground-Zerro / Phobos Public
Code Issues Pull requests Actions Releases View on GitHub ↗
422 B go
/* SPDX-License-Identifier: MIT
 *
 * Copyright (C) 2019-2026 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("Phobos/%s (%s; %s)", Number, OsName(), Arch())
}