Documentation ¶
Overview ¶
Package fieldpath implements utilities for field paths as used in protobuf field masks.
Index ¶
- func InternPathStrings(s ...string) error
- type List
- func (fps List) AddPrefix(prefix Path) List
- func (fps List) Contains(search Path, exact bool) bool
- func (fps List) ContainsOnly(search List) bool
- func (fps List) Filter(p func(Path) bool) List
- func (fps List) Len() int
- func (fps List) Less(i, j int) bool
- func (fps List) Map(m func(Path) Path) List
- func (fps List) MatchAll(p func(Path) bool) bool
- func (fps List) MatchAny(p func(Path) bool) bool
- func (fps List) RemovePrefix(prefix Path) List
- func (fps List) Sort() List
- func (fps List) String() string
- func (fps List) Swap(i, j int)
- func (fps List) Unique(exact bool) List
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternPathStrings ¶
InternPathStrings interns the field path strings of t. This func is typically called from init(). It is not safe for concurrent use.
Types ¶
type List ¶
type List []Path
List is a list of field paths.
func (List) AddPrefix ¶
AddPrefix returns a List with all elements of fps with the given prefix prepended.
func (List) Contains ¶
Contains returns true if fps contains search or a prefix of search (if exact is false).
func (List) ContainsOnly ¶
ContainsOnly returns true if the list contains only field paths present in search.
func (List) RemovePrefix ¶
RemovePrefix returns a List with all elements of fps that have the given prefix, but without that prefix.
Click to show internal directories.
Click to hide internal directories.