vfstest

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package vfstest provides facilities for interacting with or faking filesystems during tests and benchmarks.

Index

Constants

This section is empty.

Variables

View Source
var DiscardFile vfs.File = (*discardFile)(nil)

DiscardFile implements vfs.File but discards all written data and reads without mutating input buffers.

Functions

func WithOpenFileTracking

func WithOpenFileTracking(inner vfs.FS) (vfs.FS, func(io.Writer))

WithOpenFileTracking wraps a FS, returning an FS that will monitor open files. The second return value is a func that when invoked prints the stacks that opened the currently open files. If no files are open, the func writes nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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