file

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJsonData

func ReadJsonData[T any](t testing.TB, input io.Reader) []T

func ReadJsonLine

func ReadJsonLine[T any](t testing.TB, input io.Reader) func() (T, bool)

func ReadLines

func ReadLines(t testing.TB, input io.Reader) []string

func ReadLinesInBytes

func ReadLinesInBytes(t testing.TB, input io.Reader) [][]byte

func TempJsonLogFile

func TempJsonLogFile(t testing.TB, modifiers ...Modifier) *os.File

Types

type Modifier

type Modifier func(*fileConfig)

func Append

func Append() Modifier

func Create

func Create() Modifier

func ReadOnly

func ReadOnly() Modifier

func ReadWrite

func ReadWrite() Modifier

func Truncate

func Truncate() Modifier

func WithDirectory

func WithDirectory(dir string) Modifier

func WithName

func WithName(name string) Modifier

func WithPermissions

func WithPermissions(perms os.FileMode) Modifier

func WriteOnly

func WriteOnly() Modifier

Jump to

Keyboard shortcuts

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