github.com/jxskiss/gopkg/v2@v2.14.9-0.20240514120614-899f3e7952b4/internal/machineid/id.go (about) 1 package machineid 2 3 import "fmt" 4 5 // ID returns the platform specific machine id of the current host OS. 6 func ID() (string, error) { 7 id, err := readPlatformMachineID() 8 if err != nil { 9 return "", fmt.Errorf("machineid: %v", err) 10 } 11 return id, nil 12 }