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
, containingEvaluationReason
and related types that were formerly ingo-server-sdk
. - Package
ldtime
, containingUnixMillisecondTime
. - Package
lduser
, containingUser
and related types that were formerly ingo-server-sdk
. - Package
jsonstream
, a fast JSON encoding tool that is used internally by the SDK. ldvalue.OptionalString
now implementsencoding.TextMarshaler
andencoding.TextUnmarshaler
. This is not used by the Go SDK, but can be helpful when usingOptionalString
in other contexts.ldvalue.OptionalBool
andldvalue.OptionalInt
are analogous toldvalue.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
User
type is now opaque and immutable; there is no direct access to its fields. - The
User
type no longer uses pointers orinterface{}
internally, decreasing the need for heap allocations. - Reading a
User
from JSON withjson.Unmarshal
now returns an error if thekey
property is missing or null. EvaluationDetail.VariationIndex
is now anOptionalInt
rather than anint
.EvaluationReason
is 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-sdk
have been removed.