machinecode

package
v0.0.0-...-0fa8407 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPUID

func GetCPUID() (string, error)

获取CPU ID 由 gopsutil实现

func GetDiskSerialNumber

func GetDiskSerialNumber() (string, error)

获取硬盘序列号 ghw实现,windows下建议使用windows.GetDriveDiskSerial()

func GetMachineId

func GetMachineId() (string, error)

func GetOneMacAddress

func GetOneMacAddress() (string, error)

得到一个MacAddress,优先获取WLAN网卡

Types

type MachineCode

type MachineCode struct {
	MachineId  string
	DiskSerial string
	MacAddress string
	CpuId      string
}

func GetMachineCode

func GetMachineCode() (MachineCode, []error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL