Releases: configcat/go-sdk
Releases · configcat/go-sdk
v9.1.0
Added
- A new Refresh function, which allows control of the whole operation by passing the given Context all the way down the execution tree.
Changed
- Increased Go version to
v1.23 - Fixed a case where fetch errors were not logged. Upon a failed fetch, when there was a valid config JSON in the cache, the fetch error was not logged.
- Restricted the newly downloaded config JSON processing to only
200 OKHTTP response status codes and valid response payloads. This way, the SDK won't overwrite the cache if it receives a syntactically valid but actually invalid config JSON payload, such as{},null, or an empty string.
v9.0.7
v9.0.6
v9.0.5
v9.0.4
v9.0.3
v9.0.2
v9.0.1
v9.0.0
Added
- Support for the new Config JSON v6 format: update the config model and implement new features in setting evaluation logic.
- Consistent evaluation-related logging across SDKs.
Changed
- The config JSON v5 format is no longer accepted by flag overrides. If you use this feature, you must convert your override JSON file(s) to the v6 format. You can do this using the
config-json convert v5-to-v6command of the ConfigCat CLI tool. - Rename the
MatchedEvaluationRulefield toMatchedTargetingRuleand theMatchedEvaluationPercentageRulefield toMatchedPercentageOptioninEvaluationDetailsData. - User object related changes:
- Signature of
UserAttributesinterface:GetAttribute(attr string) string->GetAttribute(attr string) interface{} - Type of
Customfield ofUserData:map[string]string->map[string]interface{} - Support for using
map[string]interface{}as the User in evaluation functions was added.
- Signature of
- Signature of the
Loggerinterface:- Before:
type Logger interface { GetLevel() LogLevel Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) }
- After:
type Logger interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) }
- Option to define the LogLevel is moved to the
Clientinitialization config:config := configcat.Config{ LogLevel: LogLevelInfo, // PollingMode: configcat.AutoPoll, // etc. }
- The constant values related to the
LogLeveltype alias were changed:LogLevelDebug LogLevel = -2 LogLevelInfo LogLevel = -1 LogLevelWarn LogLevel = 0 // default level LogLevelError LogLevel = 1 LogLevelNone LogLevel = 2
- Before:
Removed
- Dependency on
logrus. It was replaced by a simple logger built upon thelogpackage.