mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-01 03:16:31 +02:00
* upgrade to go v1.24 * add a macOS-specific //nolint comment too --------- Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
21 lines
340 B
Go
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
|
|
}
|