ioz

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ioz contains supplemental io functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close added in v0.36.0

func Close(ctx context.Context, c io.Closer)

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

func FPrintFile(w io.Writer, name string) error

FPrintFile reads file from name and writes it to w.

func MarshalYAML

func MarshalYAML(v any) ([]byte, error)

MarshalYAML is our standard mechanism for encoding YAML.

func PrintFile

func PrintFile(name string) error

PrintFile reads file from name and writes it to stdout.

func UnmarshallYAML

func UnmarshallYAML(data []byte, v any) error

UnmarshallYAML is our standard mechanism for decoding YAML.

Types

This section is empty.

Jump to

Keyboard shortcuts

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