// Load optional logbase configuration file parameters. func LoadConfig(path string) (config *LogbaseConfiguration, err error) { config = DefaultConfig() _, err = os.Stat(path) if os.IsNotExist(err) { err = nil return } if err != nil { return } _, err = toml.DecodeFile(path, &config) return }
// Load optional server configuration file parameters. func LoadServerConfig(path string) (config *ServerConfiguration, err error) { _, err = os.Stat(path) if os.IsNotExist(err) { config = DefaultServerConfig() err = nil return } if err != nil { return } config = new(ServerConfiguration) _, err = toml.DecodeFile(path, &config) return }