io

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PathSeparator = string(os.PathSeparator)

Variables

This section is empty.

Functions

func CloseFileIgnore

func CloseFileIgnore(file *os.File)

CloseFileIgnore closes file ignoring errors, mainly for deferred cleanup.

func ExcludeTestFilter

func ExcludeTestFilter() filter.LoaderFilter

func JSONRoundTrip

func JSONRoundTrip(from any, to any) error

JSONRoundTrip convert any value to JSON and back again.

func LoadRegalBundleFS

func LoadRegalBundleFS(fs files.FS) (bundle.Bundle, error)

LoadRegalBundleFS loads bundle embedded from policy and data directory.

func LoadRegalBundlePath

func LoadRegalBundlePath(path string) (bundle.Bundle, error)

LoadRegalBundlePath loads bundle from path.

func MustJSONRoundTrip added in v0.8.0

func MustJSONRoundTrip(from any, to any)

MustJSONRoundTrip convert any value to JSON and back again, exit on failure.

func MustLoadRegalBundleFS

func MustLoadRegalBundleFS(fs files.FS) bundle.Bundle

MustLoadRegalBundleFS loads bundle embedded from policy and data directory, exit on failure.

func MustLoadRegalBundlePath

func MustLoadRegalBundlePath(path string) bundle.Bundle

MustLoadRegalBundlePath loads bundle from path, exit on failure.

func MustYAMLToMap

func MustYAMLToMap(from io.Reader) (m map[string]any)

MustYAMLToMap creates a map from reader, expecting YAML content, or fail.

func ToMap added in v0.12.0

func ToMap(a any) map[string]any

ToMap convert any value to map[string]any, or panics on failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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