toml

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: BSD-3-Clause Imports: 9 Imported by: 3

README

toml

Contains standard file wrapper methods for reading and writing TOML files: Open, Read, Save, Write.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(obj any, filename string) error

Open reads object from given TOML file.

func OpenFS

func OpenFS(obj any, fsys fs.FS, file string) error

OpenFS reads object from given TOML file, using the fs.FS filesystem -- e.g., for embed files.

func OpenFromPaths

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

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

func Read

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

Read reads object TOML encoding from given reader,

func ReadBytes

func ReadBytes(obj any, b []byte) error

ReadBytes reads TOML from given bytes,

func Save

func Save(obj any, file string) error

Save writes TOML to given file.

func Write

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

Write writes TOML to given writer.

func WriteBytes

func WriteBytes(obj any) []byte

WriteBytes writes TOML returning bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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