1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package qemu import ( "os" "github.com/pkg/errors" ) func getSocketDir() (string, error) { tmpDir, ok := os.LookupEnv("TMPDIR") if !ok { return "", errors.New("unable to resolve TMPDIR") } return tmpDir, nil }