Skip to content

Releases: launchdarkly/go-sdk-common

v3.4.0

25 Jul 19:29
4d8d07a
Compare
Choose a tag to compare

3.4.0 (2025-07-25)

Features

  • Add ldcontext.NewBuilderWithCapacity constructor (#40) (8c65d90)

Bug Fixes

  • Bump minimum go version to 1.24 (3a5523a)

v3.3.0

19 May 16:57
47bb7a2
Compare
Choose a tag to compare

3.3.0 (2025-05-19)

Features

  • Create generic Option type inspired by Rust (#34) (1e748d5)

v3.2.0

21 Oct 18:16
b328603
Compare
Choose a tag to compare

3.2.0 (2024-10-21)

Features

  • reduce memory allocation for common slice and map types (#30) (ab9387c)

v3.1.0

11 Oct 17:53
Compare
Choose a tag to compare

[3.1.0] - 2023-10-11

Added:

  • Introduced ldmigration and ldsampling utility packages to support technology migration use cases.

v3.0.1

01 Mar 22:26
Compare
Choose a tag to compare

[3.0.1] - 2023-03-01

Fixed:

  • Fixed unmarshaling bug in easyJSON implementation when privateAttributes or redactedAttributes were encountered in Context _meta attribute, but not expected.

v3.0.0

01 Dec 00:53
Compare
Choose a tag to compare

[3.0.0] - 2022-11-30

This major version release of go-sdk-common corresponds to the upcoming v6.0.0 release of the LaunchDarkly Go SDK (go-server-sdk), and cannot be used with earlier SDK versions.

Added:

  • The new package ldcontext with the types Context and Kind defines the new "context" model. "Contexts" are a replacement for the earlier concept of "users"; they can be populated with attributes in more or less the same way as before, but they also support new behaviors. More information about these features will be included in the release notes for the v6.0.0 SDK release.
  • The new package ldattr defines the attribute reference syntax, for referencing subproperties of JSON objects in flag evaluations or private attribute configuration. Applications normally will not need to reference this package.

Changed:

  • The minimum Go version is now 1.18.
  • The SDK packages now use regular Go module import paths rather than gopkg.in paths: gopkg.in/launchdarkly/go-sdk-common.v2 is replaced by github.com/launchdarkly/go-sdk-common/v3.
  • The type lduser.User has been redefined to be an alias for ldcontext.Context. This means that existing application code referencing lduser.User can still work as long as it is treating the user as an opaque value, and not calling methods on it that were specific to that type.
  • lduser.NewUser and lduser.UserBuilder now create an instance of Context instead of User. This is as a convenience so that any code that was previously using these methods to construct a user, but did not reference the User type directly for the result, may still be usable without changes. It is still preferable to use the new constructors and builders for Context.
  • The Secondary attribute which existed in User does not exist in Context and is no longer a supported feature.
  • It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
  • If you were using JSON serialization to produce a representation of a User, the new type Context uses a different JSON schema, so any code that reads the JSON will need to be adjusted. If you are passing the JSON to other code that uses LaunchDarkly SDKs, make sure you have updated all SDKs to versions that use the new context model. (However, unmarshaling a Context from JSON data will still work correctly even if the JSON is in the old user format.)

Removed:

  • Removed the Secondary meta-attribute in lduser.UserBuilder.

v2.5.1

30 Jun 20:36
Compare
Choose a tag to compare

[2.5.1] - 2022-06-30

Changed:

  • If you create an ldvalue.Value with the ldvalue.Raw(json.RawMessage) constructor, and you pass a zero-length or nil value to the constructor, and then encode the Value to JSON with json.Marshal or an equivalent method, the JSON output will now be null (that is, the literal characters null representing a JSON null value). Previously it would have been a zero-length string, which is not valid as the JSON encoding of any value and could cause the SDK to output a malformed JSON document if the document contained such a value.

2.5.0

14 Oct 16:44
Compare
Choose a tag to compare

[2.5.0] - 2021-10-14

This release was unintended and can be ignored. It contains no code changes, only changes to the CI build.

2.4.0

19 Jul 22:09
Compare
Choose a tag to compare

[2.4.0] - 2021-07-19

Added:

  • In ldreason, added new optional status information related to the new big segments feature.

2.3.0

17 Jun 17:07
Compare
Choose a tag to compare

[2.3.0] - 2021-06-17

Added:

  • The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform feature now available to early access customers.