diff --git a/config.go b/config.go index 582b74e..24996c0 100644 --- a/config.go +++ b/config.go @@ -47,17 +47,17 @@ func (d *Directive) ChildByName(name string) *Directive { return nil } -func Load(path string) (*Directive, error) { +func LoadConfig(path string) (*Directive, error) { f, err := os.Open(path) if err != nil { return nil, err } defer f.Close() - return Parse(f) + return ParseConfig(f) } -func Parse(r io.Reader) (*Directive, error) { +func ParseConfig(r io.Reader) (*Directive, error) { scanner := bufio.NewScanner(r) var directives []*Directive diff --git a/main.go b/main.go index 82750ab..caf9937 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ func main() { flag.StringVar(&configPath, "config", configPath, "path to configuration file") flag.Parse() - cfg, err := Load(configPath) + cfg, err := LoadConfig(configPath) if err != nil { log.Fatalf("failed to load config file: %v", err) }