Commit e48a2e1
prepare 2.5.1 release (#21)
* implement Value type for arbitrary JSON values
* force CI rebuild
* add go get
* fix go get
* fix lint in CI
* add Equal()
* add EvaluationDetail and EvaluationReason
* fix import path
* readme fixes
* update for v2
* fix doc comments
* add OptionalString
* misc cleanup, method renaming, better test coverage
* package comments
* changed repo name
* numbers can't have leading decimal point
* actually we decided on go-sdk-common, not go-sdk-core
* add license file
* OptionalString improvements + misc fixes
* add OrElse
* add tests
* comment
* remove unsafe interface{} usage
* copy User and related types from go-server-sdk
* OptionalString improvements + misc fixes (#2)
* OptionalString improvements + misc fixes
* add OrElse
* add tests
* comment
* (common v2/SDK v5) don't use pointers or interface{}s in User
* lint
* lint
* rm references to obsolete function
* (v2 - #1) copy User and related types from go-server-sdk (#3)
* copy User and related types from go-server-sdk
* lint
* lint
* rm references to obsolete function
* hide all User fields, improve internal structure, add getters
* lint
* add convenience methods for enumerable types
* User model improvements related to custom/private attributes
* lint
* update release config
* update release config
* fix package references
* add ldlog package to go-sdk-common
* lint
* drop Go 1.8-1.11 and update linter
* gitignore
* lint
* add ldtime package for time helpers
* add Go 1.14 in CI
* desupport Go 1.12
* makefile improvement
* make repo a module
* don't install dep
* yaml fix
* update golangci-lint + misc code cleanup
* add methods for detecting current log level
* enforce consistent import groups
* enable stylecheck, fix comment
* add prerelease readme note
* improve test coverage and enforce coverage goals (#18)
* update readme note about import path, add godoc badge
* better badge
* omit unset properties in user JSON instead of serializing null value
* don't allocate extra objects when setting user builder properties
* add generic user attr setter and more Value helper methods
* add benchmarks and enforce zero-allocation goals
* implement streaming JSON serialization (#23)
* fix bug in JSONBuffer state when writing zeroes
* fix note about import path
* go mod tidy
* fix JSONBuffer string escaping, + slight refactor
* remove accidental inclusions from another branch
* lint
* remove inapplicable comments
* add ability to send buffered JSON output to another writer
* add log test helper package
* add UnmarshalText and other helper methods to OptionalString
* use go-test-helpers v2 (removes unwanted eventsource dependency) (#28)
* user unmarshaling should fail if key is missing (#30)
* add OptionalInt type
* test coverage
* keep method signature of NewEvaluationDetail the same as it used to be
* comment
* add OptionalBool type and use it for User.Anonymous (#32)
* add OptionalBool type and use it for User.Anonymous
* comment
* add ldlogtest helper for dumping captured log output
* add Go 1.15 build and remove beta changelog
* update Go version in readme
* rm prerelease note
* better error reporting when unmarshaling User, OptionalString, etc. (#35)
* add IsDefined() methods to optional-like types
* better copy-on-write behavior for maps/slices; expose map & array types
* use new go-jsonstream API (#38)
* change go-jsonstream import path back to gopkg.in since the repo is public now
* add conditionally-compiled EasyJSON methods
* update for go-jsonstream API changes
* build in Windows with Go 1.14
* update CircleCI Windows image
* treat null as equivalent to empty array for privateAttributeNames in user JSON
* EasyJSON optimizations for ldvalue and lduser types (#43)
* EasyJSON optimizations for ldvalue and lduser types
* revert unnecessary changes to non-easyjson implementation
* fix test (detection of trailing comma is not a well-defined use case)
* require a JSON object (not null) when parsing a User
* Removed the guides link
* Add inExperiment attribute to FALLTHROUGH and RULE_MATCH reasons (#45)
This adds an attribute inExperiment to reasons of kinds FALLTHROUGH and RULE_MATCH, as specified in the Experiment Traffic Allocation spec.
This attribute is intended to indicate whether the user was targeted by an experiment rollout, and if so, whether they were allocated to one of the experiment variations.
We currently plan to use this for two things:
* to allow event consumers (currently, the experimentation pipeline and Data Export customers) to filter feature events to only those from users who are part of an experiment.
* to allow some SDKs, which use reasons to determine whether to send full events, to avoid sending feature events in the first place after evaluating experiment rollouts for users who are not part of the experiment. (It might seem like this makes the filtering requirement redundant, since there's no need to filter out events that the SDKs declined to send in the first place, but for Data Export customers we want to send all of the events but still filter them for experiment analysis.)
* Enable tests when releasing (#46)
* Enable tests when releasing (#46)
* add unbounded segments status to evaluation reasons (#44)
* "big" is the new "unbounded" (#47)
* update go-jsonstream version for ch110425 bugfix
* update to newer Releaser config format, add Go 1.16 CI (#50)
* update to newer Releaser config format, add Go 1.16 CI
* run code coverage job in Go 1.15
* Updates docs URLs
* add CI job for Go 1.17; update linter & test coverage script
* add comparative benchmarks for v2 (#66)
* add comparative benchmarks for v2
* DRY
* transparently convert empty raw JSON value to null
* fix linter in build
* lint
Co-authored-by: Eli Bishop <eli@launchdarkly.com>
Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com>
Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com>
Co-authored-by: Sam Stokes <sstokes@launchdarkly.com>
Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com>
Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com>
Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com>1 parent ee73eda commit e48a2e1
File tree
14 files changed
+321
-81
lines changed- lduser
- ldvalue
14 files changed
+321
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 7 | + | |
23 | 8 | | |
24 | 9 | | |
25 | 10 | | |
| |||
40 | 25 | | |
41 | 26 | | |
42 | 27 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 9 | + | |
| 10 | + | |
28 | 11 | | |
29 | 12 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
33 | 22 | | |
34 | 23 | | |
35 | 24 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 37 | + | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
52 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
| 13 | + | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
0 commit comments