Skip to content

Commit b1b102c

Browse files
authored
fix(experimental): Update usability warning for LDScopedClient - in beta, subject to change (#312)
Updating the disclaimer as we encourage using this but we anticipate potential changes in the future.
1 parent e946080 commit b1b102c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

ldclient_gocontext.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ type scopedClientKey struct{}
1212
// ctx := ld.GoContextWithScopedClient(context.Background(), scopedClient)
1313
// otherFunction(ctx)
1414
//
15-
// This function is not stable, and not subject to any backwards compatibility
16-
// guarantees or semantic versioning. It is not suitable for production usage. Do
17-
// not use it. You have been warned.
15+
// This function is in beta. It is still undergoing testing and active
16+
// development. Its functionality may change without notice, including becoming
17+
// backwards incompatible.
1818
func GoContextWithScopedClient(ctx context.Context, client *LDScopedClient) context.Context {
1919
return context.WithValue(ctx, scopedClientKey{}, client)
2020
}
@@ -32,9 +32,9 @@ func GoContextWithScopedClient(ctx context.Context, client *LDScopedClient) cont
3232
// }
3333
// }
3434
//
35-
// This function is not stable, and not subject to any backwards compatibility
36-
// guarantees or semantic versioning. It is not suitable for production usage. Do
37-
// not use it. You have been warned.
35+
// This function is in beta. It is still undergoing testing and active
36+
// development. Its functionality may change without notice, including becoming
37+
// backwards incompatible.
3838
func GetScopedClient(ctx context.Context) (*LDScopedClient, bool) {
3939
client, ok := ctx.Value(scopedClientKey{}).(*LDScopedClient)
4040
return client, ok
@@ -49,9 +49,9 @@ func GetScopedClient(ctx context.Context) (*LDScopedClient, bool) {
4949
// // handle err as appropriate...
5050
// }
5151
//
52-
// This function is not stable, and not subject to any backwards compatibility
53-
// guarantees or semantic versioning. It is not suitable for production usage. Do
54-
// not use it. You have been warned.
52+
// This function is in beta. It is still undergoing testing and active
53+
// development. Its functionality may change without notice, including becoming
54+
// backwards incompatible.
5555
func MustGetScopedClient(ctx context.Context) *LDScopedClient {
5656
client, ok := GetScopedClient(ctx)
5757
if !ok {

ldclient_scoped.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
// create a new scoped client for each logical scope where the evaluation context
1919
// should be isolated from other scopes, like a web request.
2020
//
21-
// This type is not stable, and not subject to any backwards compatibility
22-
// guarantees or semantic versioning. It is not suitable for production usage. Do
23-
// not use it. You have been warned.
21+
// This type is in beta. It is still undergoing testing and active development.
22+
// Its functionality may change without notice, including becoming backwards
23+
// incompatible.
2424
//
2525
// An LDScopedClient is created by calling [NewScopedClient]. This sets the
2626
// initial context to be used for all operations:
@@ -84,9 +84,9 @@ type LDScopedClient struct {
8484
// For more information on how to use the scoped client, read the documentation
8585
// for LDScopedClient.
8686
//
87-
// This function is not stable, and not subject to any backwards compatibility
88-
// guarantees or semantic versioning. It is not suitable for production usage. Do
89-
// not use it. You have been warned.
87+
// This function is in beta. It is still undergoing testing and active
88+
// development. Its functionality may change without notice, including becoming
89+
// backwards incompatible.
9090
func NewScopedClient(client *LDClient, context ldcontext.Context) *LDScopedClient {
9191
_ = client.TrackData("$ld:scoped:usage", context, ldvalue.String("new"))
9292
cc := &LDScopedClient{

0 commit comments

Comments
 (0)