chore: no need to have separate getConfigPath
parent
31308c6ead
commit
31736cfb1e
|
@ -35,7 +35,7 @@ type Path struct {
|
|||
|
||||
// LoadConfig return config, configDemo
|
||||
func LoadConfig(path string) (*configReal, *configDemo, error) {
|
||||
configPath := getConfigPath(path)
|
||||
configPath := filepath.Join(path, configDirPath, configFile)
|
||||
bytes, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to read file%s: %w", configPath, err)
|
||||
|
@ -56,7 +56,3 @@ func LoadConfig(path string) (*configReal, *configDemo, error) {
|
|||
|
||||
return &cfgReal, &cfgDemo, nil
|
||||
}
|
||||
|
||||
func getConfigPath(path string) string {
|
||||
return filepath.Join(path, configDirPath, configFile)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue