fixup! Update documentation.

This commit is contained in:
2025-02-28 18:10:56 +00:00
parent f87a53ec65
commit 98f6c31e9d
16 changed files with 149 additions and 149 deletions
+6 -6
View File
@@ -34,18 +34,18 @@ type Config struct {
// ReadConfig reads the configuration from a file
func ReadConfig(file string) (*Config, error) {
config := &Config{}
viper.SetConfigFile(file)
err := viper.ReadInConfig()
if err != nil {
err = fmt.Errorf("fatal error config file: %s", err)
return config, err
}
viper.UnmarshalKey("wording", &config.Wording)
viper.UnmarshalKey("force", &config.Force)
viper.UnmarshalKey("blacklist", &config.Blacklist)
return config, nil
}
@@ -55,14 +55,14 @@ func ApplyForcedVersioning(force Force, semver *SemVer) {
Debug("Forced versioning (MAJOR)", map[string]interface{}{"major": force.Major})
semver.Major = force.Major
}
if force.Minor > 0 {
Debug("Forced versioning (MINOR)", map[string]interface{}{"minor": force.Minor})
semver.Minor = force.Minor
}
if force.Patch > 0 {
Debug("Forced versioning (PATCH)", map[string]interface{}{"patch": force.Patch})
semver.Patch = force.Patch
}
}
}