...

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

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

     1  package lderrors
     2  
     3  // ErrAttributeEmpty means that you tried to use an uninitialized ldattr.Ref{}, or one that was initialized
     4  // from an empty string, or from a string that consisted only of a slash.
     5  //
     6  // For details of the attribute reference syntax, see ldattr.Ref.
     7  type ErrAttributeEmpty struct{}
     8  
     9  // ErrAttributeExtraSlash means that an attribute reference contained a double slash or trailing slash
    10  // causing one path component to be empty, such as "/a//b" or "/a/b/".
    11  //
    12  // For details of the attribute reference syntax, see ldattr.Ref.
    13  type ErrAttributeExtraSlash struct{}
    14  
    15  // ErrAttributeInvalidEscape means that an attribute reference contained contained a "~" character that was
    16  // not followed by "0" or "1".
    17  //
    18  // For details of the attribute reference syntax, see ldattr.Ref.
    19  type ErrAttributeInvalidEscape struct{}
    20  
    21  const (
    22  	msgAttributeEmpty         = "attribute reference cannot be empty"
    23  	msgAttributeExtraSlash    = "attribute reference contained a double slash or a trailing slash"
    24  	msgAttributeInvalidEscape = "attribute reference contained an escape character (~) that was not followed by 0 or 1"
    25  )
    26  
    27  func (e ErrAttributeEmpty) Error() string         { return msgAttributeEmpty }
    28  func (e ErrAttributeExtraSlash) Error() string    { return msgAttributeExtraSlash }
    29  func (e ErrAttributeInvalidEscape) Error() string { return msgAttributeInvalidEscape }
    30  

View as plain text