Help us shape the future of Go! Take the 2026 Go Developer Survey

testtemp

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package testtemp provides temporary directories for tests whose ancestors contain no symlinks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(t testing.TB) string

Dir returns a temporary directory scoped to the test, like testing.TB.TempDir, with every symlinked ancestor resolved.

macOS reports the operating system temporary directory under /var, a symlink to /private/var. Grafo canonicalizes repository roots, index paths, and installed binary paths before reporting them back, and the embedding cache refuses to create directories beneath a symlinked ancestor, so a fixture built on the raw TempDir value disagrees with the code under test. Resolving the directory once, here, keeps fixtures and production on one spelling of every path on every platform.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL