pomerium/internal/testenv/temp_darwin.go
Caleb Doxsey c47055bece
upgrade to go v1.24 (#5562)
* upgrade to go v1.24

* add a macOS-specific //nolint comment too

---------

Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
2025-04-02 15:53:09 -06:00

21 lines
340 B
Go

//go:build darwin
package testenv
import (
"os"
"testing"
)
// macos temp directory names are too long
// https://github.com/golang/go/issues/62614
func tempDir(t testing.TB) string {
dir, err := os.MkdirTemp("", "test") //nolint:usetesting
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() {
os.RemoveAll(dir)
})
return dir
}