chore: no need to have separate getConfigPath

main
sudo pacman -Syu 2021-05-05 16:41:31 +07:00
parent 31308c6ead
commit 31736cfb1e
1 changed files with 1 additions and 5 deletions

View File

@ -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)
}