2.0.0
[2.0.0] - 2020-09-18
Initial release of the newer types that will be used in Go SDK 5.0 and above.
Added:
- Package ldlog, which was formerly a subpackage ofgo-server-sdk.
- Package ldlogtest, containing test helpers for use withldlog.
- Package ldreason, containingEvaluationReasonand related types that were formerly ingo-server-sdk.
- Package ldtime, containingUnixMillisecondTime.
- Package lduser, containingUserand related types that were formerly ingo-server-sdk.
- Package jsonstream, a fast JSON encoding tool that is used internally by the SDK.
- ldvalue.OptionalStringnow implements- encoding.TextMarshalerand- encoding.TextUnmarshaler. This is not used by the Go SDK, but can be helpful when using- OptionalStringin other contexts.
- ldvalue.OptionalBooland- ldvalue.OptionalIntare analogous to- ldvalue.OptionalString, representing values that may be undefined without using pointers. These are used in the Go SDK.
Changed:
- The minimum Go version is now 1.14.
- The Usertype is now opaque and immutable; there is no direct access to its fields.
- The Usertype no longer uses pointers orinterface{}internally, decreasing the need for heap allocations.
- Reading a Userfrom JSON withjson.Unmarshalnow returns an error if thekeyproperty is missing or null.
- EvaluationDetail.VariationIndexis now an- OptionalIntrather than an- int.
- EvaluationReasonis now a struct.
- This project is now a Go module, although it can still be used from non-module code.
Removed:
- In ldvalue, there are no longer methods for wrapping an existinginterface{}value in aValue.
- All deprecated members of types that were moved here from go-server-sdkhave been removed.