tmpdir

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tmpdir is a TESTING-ONLY utility.

Some tests directly or indirectly exercising the directory/explicitfilepath subpackage expect the path returned by ioutil.TempDir to be canonical in the directory/explicitfilepath sense (absolute, no symlinks, cleaned up).

ioutil.TempDir uses $TMPDIR by default, and on macOS, $TMPDIR is by default set to /var/folders/…, with /var a symlink to /private/var , which does not match our expectations. So, tests which want to use ioutil.TempDir that way, can import _ "github.com/containesr/image/internal/testing/explicitfilepath-tmpdir" to ensure that $TMPDIR is canonical and usable as a base for testing path canonicalization in its subdirectories.

NEVER use this in non-testing subpackages!

Jump to

Keyboard shortcuts

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