We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d123c92 commit 571a6dbCopy full SHA for 571a6db
client.go
@@ -29,6 +29,18 @@ func NewClientWithOptions(sdkKey string, options *Options) *Client {
29
return client
30
}
31
32
+// Initializes a Statsig Client with the given sdkKey and options
33
+// returning the initialized client and details of initialization
34
+func NewClientWithDetails(sdkKey string, options *Options) (*Client, InitializeDetails) {
35
+ client, context := newClientImpl(sdkKey, options)
36
+ return client, InitializeDetails{
37
+ Duration: time.Since(context.Start),
38
+ Success: context.Success,
39
+ Error: context.Error,
40
+ Source: context.Source,
41
+ }
42
+}
43
+
44
func newClientImpl(sdkKey string, options *Options) (*Client, *initContext) {
45
context := newInitContext()
46
diagnostics := newDiagnostics(options)
0 commit comments