...

Package ez

Overview ▾

Package ez provides data serialization and deseralization in YAML format

func DefaultConfigPath

func DefaultConfigPath(appName string) (string, error)

DefaultConfigPath returns the default path to a configuration file for an application with the specified name. If no name is provided, the executable name is used.

func Deserialize

func Deserialize(object interface{}, path string) error

Deserialize loads data from the specified path. If a file does not exist at the specified path, no error is returned.

func Serialize

func Serialize(object interface{}, path string) error

Serialize stores data in YAML format at the specified path.