config: ReadConfig -> Read
The function is already in the config package, the old naming is redundant.
This commit is contained in:
parent
6c2521eeca
commit
dc9741b798
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -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()))
|
||||
|
|
Loading…
Add table
Reference in a new issue