M config/config.go => config/config.go +2 -2
@@ 385,8 385,8 @@ func parseBlock(block scfg.Block, config *Config) error {
return nil
}
-// ReadConfig reads an scfg formatted file and returns the configuration struct.
-func ReadConfig(path string) (*Config, error) {
+// Read reads an scfg formatted file and returns the configuration struct.
+func Read(path string) (*Config, error) {
cfg, err := scfg.Load(path)
if err != nil {
return nil, err
M config/config_test.go => config/config_test.go +1 -1
@@ 117,7 117,7 @@ cache {
t.Errorf("failed to write config file: %v", err)
}
- cfg, err := ReadConfig(configPath)
+ cfg, err := Read(configPath)
if err != nil {
t.Errorf("failed to read config file: %v", err)
}
M main.go => main.go +1 -1
@@ 498,7 498,7 @@ func main() {
os.Exit(0)
}
- cfg, err := config.ReadConfig(configPath)
+ cfg, err := config.Read(configPath)
if err != nil {
slog.Error("Failed to read config",
slog.String("error", err.Error()))