mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.75 to 7.0.76 (#3262)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.75 to 7.0.76. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.75...v7.0.76) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
29
vendor/github.com/rs/xid/hostid_darwin.go
generated
vendored
29
vendor/github.com/rs/xid/hostid_darwin.go
generated
vendored
@ -2,8 +2,33 @@
|
||||
|
||||
package xid
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"errors"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func readPlatformMachineID() (string, error) {
|
||||
return syscall.Sysctl("kern.uuid")
|
||||
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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user