testpaths

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGoModNotFound = errors.New("go.mod not found")

ErrGoModNotFound is returned when no ancestor directory contains go.mod.

Functions

func Asset

func Asset(elem ...string) (string, error)

Asset joins elem under tests/assets (relative to module root).

func ModuleRoot

func ModuleRoot() (string, error)

ModuleRoot returns the absolute path to the Go module root by walking up from the current working directory until go.mod is found.

func MustAsset

func MustAsset(t testing.TB, elem ...string) string

MustAsset is like Asset but fails the test on error.

func TestsAssetsDir

func TestsAssetsDir() (string, error)

TestsAssetsDir returns <moduleRoot>/tests/assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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