blob: 46ef656123cf5f3f80afc6acdc7a456d01e9d638 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package bsdp
import (
"fmt"
"golang.org/x/sys/unix"
)
// MakeVendorClassIdentifier calls the sysctl syscall on macOS to get the
// platform model.
func MakeVendorClassIdentifier() (string, error) {
// Fetch hardware model for class ID.
hwModel, err := unix.Sysctl("hw.model")
if err != nil {
return "", err
}
return fmt.Sprintf("%s/i386/%s", AppleVendorID, hwModel), nil
}
|