tomls

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecoder

func NewDecoder(r io.Reader) grows.Decoder

NewDecoder returns a new grows.Decoder

func NewEncoder

func NewEncoder(w io.Writer) grows.Encoder

NewEncoder returns a new grows.Encoder

func Open

func Open(v any, filename string) error

Open reads the given object from the given filename using TOML encoding

func OpenFS

func OpenFS(v any, fsys fs.FS, filename string) error

OpenFS reads the given object from the given filename using TOML encoding, using the given fs.FS filesystem (e.g., for embed files)

func OpenFiles

func OpenFiles(v any, filenames []string) error

OpenFiles reads the given object from the given filenames using TOML encoding

func OpenFilesFS

func OpenFilesFS(v any, fsys fs.FS, filenames []string) error

OpenFilesFS reads the given object from the given filenames using TOML encoding, using the given fs.FS filesystem (e.g., for embed files)

func OpenFromPaths

func OpenFromPaths(v any, file string, paths []string) error

OpenFromPaths reads the given object from the given TOML file, looking on paths for the file.

func Read

func Read(v any, reader io.Reader) error

Read reads the given object from the given reader, using TOML encoding

func ReadBytes

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

ReadBytes reads the given object from the given bytes, using TOML encoding

func Save

func Save(v any, filename string) error

Save writes the given object to the given filename using TOML encoding

func Write

func Write(v any, writer io.Writer) error

Write writes the given object using TOML encoding

func WriteBytes

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

WriteBytes writes the given object, returning bytes of the encoding, using TOML encoding

Types

This section is empty.

Jump to

Keyboard shortcuts

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