Documentation ¶
Overview ¶
Package ioz contains supplemental io functionality.
Index ¶
- func Close(ctx context.Context, c io.Closer)
- func FPrintFile(w io.Writer, name string) error
- func IsPathToRegularFile(path string) bool
- func MarshalYAML(v any) ([]byte, error)
- func PrintFile(name string) error
- func ReadDir(dir string, includeDirPath, markDirs, includeDot bool) (paths []string, err error)
- func UnmarshallYAML(data []byte, v any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶ added in v0.36.0
Close is a convenience function to close c, logging a warning if c.Close returns an error. This is useful in defer, e.g.
defer ioz.Close(ctx, c)
func FPrintFile ¶
FPrintFile reads file from name and writes it to w.
func IsPathToRegularFile ¶ added in v0.37.0
IsPathToRegularFile return true if path is a regular file or a symlink that resolves to a regular file. False is returned on any error.
func MarshalYAML ¶
MarshalYAML is our standard mechanism for encoding YAML.
func ReadDir ¶ added in v0.37.0
ReadDir lists the contents of dir, returning the relative paths of the files. If markDirs is true, directories are listed with a "/" suffix (including symlinked dirs). If includeDirPath is true, the listing is of the form "dir/name". If includeDot is true, files beginning with period (dot files) are included. The function attempts to continue in the present of errors: the returned paths may contain values even in the presence of a returned error (which may be a multierr).
func UnmarshallYAML ¶
UnmarshallYAML is our standard mechanism for decoding YAML.
Types ¶
This section is empty.