Documentation
¶
Index ¶
- Variables
- func ReadAll[R io.ReadCloser](acquire IOE.IOEither[error, R]) IOE.IOEither[error, []byte]
- func Write[W io.WriteCloser, R any](acquire IOE.IOEither[error, W]) func(use func(W) IOE.IOEither[error, R]) IOE.IOEither[error, R]
- func WriteAll[W io.WriteCloser](data []byte) func(acquire IOE.IOEither[error, W]) IOE.IOEither[error, []byte]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Open opens a file for reading Open = IOE.Eitherize1(os.Open) // ReadFile reads the context of a file ReadFile = IOE.Eitherize1(os.ReadFile) // WriteFile writes a data blob to a file WriteFile = func(dstName string, perm os.FileMode) func([]byte) IOE.IOEither[error, []byte] { return func(data []byte) IOE.IOEither[error, []byte] { return IOE.TryCatchError(func() ([]byte, error) { return data, os.WriteFile(dstName, data, perm) }) } } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.