diff --git a/internal/configuration/configuration.go b/internal/configuration/configuration.go index 56be846..3e7e149 100644 --- a/internal/configuration/configuration.go +++ b/internal/configuration/configuration.go @@ -24,7 +24,8 @@ type Configuration struct { } `yaml:"log"` } -func LoadConfiguration(path string) (*Configuration, error) { +// Load reads a YAML file that stores configuration of a service. +func Load(path string) (*Configuration, error) { configFile, err := os.Open(path) if err != nil { return nil, errors.Wrap(err, "failed to open configuration file") @@ -40,9 +41,8 @@ func LoadConfiguration(path string) (*Configuration, error) { return config, nil } -// SplitNetworkAddress splits ListenOn option and returns as two strings -// network type (e.g. tcp, unix, udp) and address:port or /path/to/prog.socket -// to listen on. +// SplitNetworkAddress splits ListenOn option into network type (e.g. tcp, unix, +// udp) and address:port or /path/to/service.socket to listen on. func (c *Configuration) SplitNetworkAddress() (string, string) { s := strings.Split(c.ListenOn, " ") return s[0], s[1]