system

package
v0.0.0-...-b6f9656 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentUser = user.Current
View Source
var (
	// DefaultFileSystem allows to change the implementation of the default file system, for example for tests
	DefaultFileSystem afero.Fs = afero.NewOsFs()
)

Functions

func AssertFileContents

func AssertFileContents(t *testing.T, fs afero.Fs, path string, content string) bool

func AssertModePerm

func AssertModePerm(t testing.TB, fs afero.Fs, path, mode string) bool

func AssertPathExists

func AssertPathExists(t *testing.T, fs afero.Fs, path string, msgAndArgs ...interface{}) bool

func EnsureFileContent

func EnsureFileContent(fs afero.Fs, path string, reader io.Reader) error

func EnsureTestFileContent

func EnsureTestFileContent(t *testing.T, fs afero.Fs, path string, content string)

func Env

func Env() map[string]string

Env returns the current environment variables as a usable map

func GetenvOrDefault

func GetenvOrDefault(key, defaultValue string) string

func Reset

func Reset()

Reset restores the system environment as it was when the package was imported

Types

This section is empty.

Jump to

Keyboard shortcuts

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