Merge pull request #38 from rhatdan/codespell
Run code through codespell
This commit is contained in:
commit
26ed555c0e
|
|
@ -350,7 +350,7 @@ type NetworkConfig struct {
|
||||||
// might change in the future.
|
// might change in the future.
|
||||||
func NewConfig(userConfigPath string) (*Config, error) {
|
func NewConfig(userConfigPath string) (*Config, error) {
|
||||||
|
|
||||||
// Genereate the default config for the system
|
// Generate the default config for the system
|
||||||
config, err := DefaultConfig()
|
config, err := DefaultConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -361,7 +361,7 @@ func NewConfig(userConfigPath string) (*Config, error) {
|
||||||
if userConfigPath != "" {
|
if userConfigPath != "" {
|
||||||
var err error
|
var err error
|
||||||
// ReadConfigFromFile reads in container config in the specified
|
// ReadConfigFromFile reads in container config in the specified
|
||||||
// file and then merge changes with the current defauls.
|
// file and then merge changes with the current default.
|
||||||
config, err = ReadConfigFromFile(userConfigPath, config)
|
config, err = ReadConfigFromFile(userConfigPath, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error reading user config %q", userConfigPath)
|
return nil, errors.Wrapf(err, "error reading user config %q", userConfigPath)
|
||||||
|
|
@ -395,9 +395,9 @@ func NewConfig(userConfigPath string) (*Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadConfigFromFile reads the specified config file at `path` and attempts to
|
// ReadConfigFromFile reads the specified config file at `path` and attempts to
|
||||||
// unmarshal its content into a Config. The config param specifies the previos
|
// unmarshal its content into a Config. The config param specifies the previous
|
||||||
// default config. If the path, only specifies a few fields in the Toml file
|
// default config. If the path, only specifies a few fields in the Toml file
|
||||||
// the defaults from the config paramater will be used for all other fields.
|
// the defaults from the config parameter will be used for all other fields.
|
||||||
func ReadConfigFromFile(path string, config *Config) (*Config, error) {
|
func ReadConfigFromFile(path string, config *Config) (*Config, error) {
|
||||||
logrus.Debugf("Reading configuration file %q", path)
|
logrus.Debugf("Reading configuration file %q", path)
|
||||||
_, err := toml.DecodeFile(path, config)
|
_, err := toml.DecodeFile(path, config)
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@ var _ = Describe("Config", func() {
|
||||||
Expect(config).To(BeNil())
|
Expect(config).To(BeNil())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("Test Capabilties call", func() {
|
It("Test Capabilities call", func() {
|
||||||
// Given
|
// Given
|
||||||
// When
|
// When
|
||||||
config, err := NewConfig("")
|
config, err := NewConfig("")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue