...

Source file src/github.com/launchdarkly/go-sdk-common/v3/lderrors/package_info.go

Documentation: github.com/launchdarkly/go-sdk-common/v3/lderrors

     1  // Package lderrors provides identifiers for particular kinds of errors that can be returned by
     2  // code in [github.com/launchdarkly/go-sdk-common/v3/ldcontext] or
     3  // [github.com/launchdarkly/go-sdk-common/v3/ldattr].
     4  //
     5  // Errors are only defined here if they are specifically generated by those packages.
     6  // The LaunchDarkly Go SDK ([github.com/launchdarkly/go-server-sdk/v6]) may define its own error
     7  // values for additional error conditions that are related to higher-level SDK functionality.
     8  //
     9  // Unlike some packages which define errors as exported global variables, here they are exported
    10  // as types only. This allows consistent usage regardless of whether a particular kind of error
    11  // has properties that can vary, or is a singleton with no properties. So, for instance, rather
    12  // than doing an equality test like this--
    13  //
    14  //	if err == lderrors.ErrContextKeyEmpty
    15  //
    16  // --do a type check:
    17  //
    18  //	if _, ok := err.(lderrors.ErrContextKeyEmpty); ok
    19  package lderrors
    20  

View as plain text