Skip to content

Commit

Permalink
Rename Config.loadINIConfig method
Browse files Browse the repository at this point in the history
Rename to `parseConfigFile` to better describe purpose.

refs GH-333
  • Loading branch information
atc0005 committed Nov 25, 2022
1 parent 7bbb294 commit bf7edf5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ func (c *Config) loadConfigFile(configFile ...string) error {
)
}

loadErr := c.loadINIConfig(data)
loadErr := c.parseConfigFile(data)
if loadErr != nil {
c.ConfigFileUsed = ""
return fmt.Errorf(
"failed to load configuration from INI file %q: %w",
"failed to parse configuration from file %q: %w",
c.ConfigFileUsed,
loadErr,
)
Expand Down Expand Up @@ -172,10 +172,10 @@ func (c Config) userConfigFile(appName string, filename string) (string, error)
return userConfigFileFullPath, nil
}

// loadINIConfig loads or imports the contents of an INI configuration file
// and populates the list of accounts used by applications in this project.
// Any error encountered during the import process is returned.
func (c *Config) loadINIConfig(file []byte) error {
// parseConfigFile parses a previously read INI configuration file and
// populates the list of accounts used by applications in this project. Any
// error encountered during the import process is returned.
func (c *Config) parseConfigFile(file []byte) error {

iniFile, loadErr := ini.Load(file)
if loadErr != nil {
Expand Down

0 comments on commit bf7edf5

Please sign in to comment.