//go:build windows package host import ( "fmt" "os" "os/exec" ) // OpenFolder shows dir in File Explorer. explorer.exe exits non-zero even on // success, so the process is started and not waited on. func OpenFolder(dir string) error { info, err := os.Stat(dir) if err != nil { return err } if !info.IsDir() { return fmt.Errorf("not a directory: %s", dir) } return exec.Command("explorer.exe", dir).Start() }