README
¶
persist 
Persist loads and saves Go objects to files
Usage
First get it:
go get github.com/keks/persist
Then save objects like this:
var conf Config
f, err := os.Create("./project.conf")
if err != nil {
log.Faralln("failed opening the persistent file:", err)
}
if err = persist.Save(f, &conf); err != nil {
log.Fatalln("failed to save config:", err)
}
And load them like this:
// f is still in scope
var conf Config
if err := persist.Load(f, &conf); err != nil {
log.Fatalln("failed to load config:", err)
}
Documentation
¶
Overview ¶
Package persist loads and saves Go objects to files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.