Documentation
¶
Overview ¶
Pakage resourcepath provides functions to work with AEP resource paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Element ¶
type Element string
EBNF
element = variable | literal ;
variable = "{" literal "}" ;
func (Element) GetLiteral ¶
GetLiteral returns the literal value of the element.
func (Element) IsVariable ¶
IsVariable returns true if the element is a variable.
func (Element) IsWildcard ¶
IsWildcard returns true if the element is a wildcard.
type ResourcePath ¶
type ResourcePath struct {
// contains filtered or unexported fields
}
ResourcePath represents an AEP resource path.
func NewResourcePath ¶
func NewResourcePath(elements map[string]string) *ResourcePath
NewResourcePath creates a new ResourcePath.
func ParseString ¶
func ParseString(path, pattern string) (*ResourcePath, error)
ParseString parses a path and a pattern and returns a ResourcePath.
func (ResourcePath) Get ¶
func (p ResourcePath) Get(element string) string
Get returns the value of the element. If the element is not found, an empty string is returned.
Click to show internal directories.
Click to hide internal directories.