MCPcopy
hub / github.com/grpc/grpc-go / createTmpDir

Function createTmpDir

security/advancedtls/crl_provider_test.go:345–356  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

343}
344
345func createTmpDir(t *testing.T) string {
346 t.Helper()
347
348 // Create a temp directory. Passing an empty string for the first argument
349 // uses the system temp directory.
350 dir, err := os.MkdirTemp("", "filewatcher*")
351 if err != nil {
352 t.Fatalf("os.MkdirTemp() failed: %v", err)
353 }
354 t.Logf("Using tmpdir: %s", dir)
355 return dir
356}

Calls 2

FatalfMethod · 0.65
LogfMethod · 0.65

Tested by

no test coverage detected