diff options
author | 2025-03-09 17:47:56 +0100 | |
---|---|---|
committer | 2025-03-10 01:59:49 +0100 | |
commit | 3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch) | |
tree | f61faa581feaaeaba2542b9f2b8234a590684413 /vendor/github.com/rs/xid/hostid_darwin.go | |
parent | [chore] update URLs to forked source (diff) | |
download | gotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz |
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/rs/xid/hostid_darwin.go')
-rw-r--r-- | vendor/github.com/rs/xid/hostid_darwin.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/rs/xid/hostid_darwin.go b/vendor/github.com/rs/xid/hostid_darwin.go deleted file mode 100644 index 17351563a..000000000 --- a/vendor/github.com/rs/xid/hostid_darwin.go +++ /dev/null @@ -1,34 +0,0 @@ -// +build darwin - -package xid - -import ( - "errors" - "os/exec" - "strings" -) - -func readPlatformMachineID() (string, error) { - ioreg, err := exec.LookPath("ioreg") - if err != nil { - return "", err - } - - cmd := exec.Command(ioreg, "-rd1", "-c", "IOPlatformExpertDevice") - out, err := cmd.CombinedOutput() - if err != nil { - return "", err - } - - for _, line := range strings.Split(string(out), "\n") { - if strings.Contains(line, "IOPlatformUUID") { - parts := strings.SplitAfter(line, `" = "`) - if len(parts) == 2 { - uuid := strings.TrimRight(parts[1], `"`) - return strings.ToLower(uuid), nil - } - } - } - - return "", errors.New("cannot find host id") -} |