Documentation
¶
Overview ¶
Package conf loads configuration sections from different sources and merges them into the one configuration tree.
package main
import (
"fmt"
"os"
"github.com/iph0/conf"
"github.com/iph0/conf/baseconf"
)
func init() {
os.Setenv("GOCONF_PATH", "/etc/go")
}
func main() {
loader := conf.NewLoader(
baseconf.NewDriver(),
)
config, err := loader.Load("dirs", "db")
if err != nil {
fmt.Println("Loading failed:", err)
return
}
fmt.Printf("%v\n", config)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package baseconf is the loader driver for the conf package, that loads configuration data from YAML and JSON files.
|
Package baseconf is the loader driver for the conf package, that loads configuration data from YAML and JSON files. |
|
Package merger recursively merge two data structures into new one.
|
Package merger recursively merge two data structures into new one. |
Click to show internal directories.
Click to hide internal directories.