Documentation ¶
Overview ¶
Package utils provides common utilities for the use of other packages in oasdiff.
Index ¶
- func NormalizeTemplatedPath(path string) (string, uint, []string)
- type StringList
- func (stringList *StringList) Contains(s string) bool
- func (stringList *StringList) Empty() bool
- func (list StringList) Len() int
- func (list StringList) Less(i, j int) bool
- func (stringList *StringList) Minus(other StringList) StringList
- func (stringList *StringList) Set(s string) error
- func (list StringList) Sort() StringList
- func (stringList *StringList) String() string
- func (list StringList) Swap(i, j int)
- func (list StringList) ToStringSet() StringSet
- type StringMap
- type StringSet
- func (stringSet StringSet) Add(s string)
- func (stringSet StringSet) Contains(s string) bool
- func (stringSet StringSet) Copy() StringSet
- func (stringSet StringSet) Empty() bool
- func (stringSet StringSet) Equals(other StringSet) bool
- func (stringSet StringSet) Intersection(other StringSet) StringSet
- func (stringSet StringSet) Minus(other StringSet) StringSet
- func (stringSet StringSet) Plus(other StringSet) StringSet
- func (stringSet StringSet) ToStringList() StringList
- type VisitedRefs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeTemplatedPath ¶
NormalizeTemplatedPath converts a path to its normalized form, without parameter names
For example: /person/{personName} -> /person/{}
Return values: 1. The normalized path 2. Number of params 3. List of param names
This implementation is based on Paths.normalizeTemplatedPath in openapi3
Types ¶
type StringList ¶
type StringList []string
StringList is a list of string values
func (*StringList) Contains ¶
func (stringList *StringList) Contains(s string) bool
func (*StringList) Empty ¶
func (stringList *StringList) Empty() bool
Empty indicates whether a change was found in this element
func (StringList) Len ¶
func (list StringList) Len() int
Len implements the sort.Interface interface
func (StringList) Less ¶
func (list StringList) Less(i, j int) bool
Less implements the sort.Interface interface
func (*StringList) Minus ¶
func (stringList *StringList) Minus(other StringList) StringList
func (*StringList) Set ¶
func (stringList *StringList) Set(s string) error
func (StringList) Sort ¶
func (list StringList) Sort() StringList
func (*StringList) String ¶
func (stringList *StringList) String() string
func (StringList) Swap ¶
func (list StringList) Swap(i, j int)
Swap implements the sort.Interface interface
func (StringList) ToStringSet ¶
func (list StringList) ToStringSet() StringSet
type StringSet ¶
type StringSet map[string]struct{}
StringSet is a set of string values
func (StringSet) Intersection ¶
func (StringSet) ToStringList ¶
func (stringSet StringSet) ToStringList() StringList
type VisitedRefs ¶
type VisitedRefs map[string]struct{}
func (VisitedRefs) Add ¶
func (v VisitedRefs) Add(refName string)
func (VisitedRefs) IsVisited ¶
func (v VisitedRefs) IsVisited(refName string) bool
func (VisitedRefs) Remove ¶
func (v VisitedRefs) Remove(refName string)
Click to show internal directories.
Click to hide internal directories.