file

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingFileType     = errors.New("missing file type")
	ErrUnsupportedFileType = errors.New("unsupported file type")
)
View Source
var ErrFileNotFound = errors.New("file not found")

Functions

func Load

func Load(fs afero.Fs, filename string, out interface{}) error

Load loads a given filename into the out interface. The file should be a valid json or yaml format.

func Save

func Save(fs afero.Fs, filePath string, data interface{}) error

Save saves a given data interface into a given file path The file should be a yaml format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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