Documentation ¶
Index ¶
- func AsBytes(filename string) ([]byte, error)
- func AsBytesOrFail(t test.Failer, filename string) []byte
- func AsString(filename string) (string, error)
- func AsStringArray(files ...string) ([]string, error)
- func AsStringArrayOrFail(t test.Failer, files ...string) []string
- func AsStringOrFail(t test.Failer, filename string) string
- func NormalizePath(originalPath string) (string, error)
- func ReadDir(filePath string, extensions ...string) ([]string, error)
- func ReadDirOrFail(t test.Failer, filePath string, extensions ...string) []string
- func ReadTarFile(filePath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsBytesOrFail ¶
AsBytesOrFail calls AsBytes and fails the test if any errors occurred.
func AsString ¶
AsString is a convenience wrapper around os.ReadFile that converts the content to a string.
func AsStringArray ¶
AsString is a convenience wrapper around os.ReadFile that converts the content to a string.
func AsStringArrayOrFail ¶
AsStringArrayOrFail calls AsStringOrFail and then converts to string.
func AsStringOrFail ¶
AsStringOrFail calls AsBytesOrFail and then converts to string.
func NormalizePath ¶
NormalizePath expands the homedir (~) and returns an error if the file doesn't exist.
func ReadDir ¶
ReadDir returns the names of all files in the given directory. This is not recursive. The base path is appended; for example, ReadDir("dir") -> ["dir/file1", "dir/folder1"]
func ReadDirOrFail ¶
func ReadTarFile ¶
ReadTarFile reads a tar compress file from the embedded
Types ¶
This section is empty.