Documentation ¶
Overview ¶
Package common code
Index ¶
- Variables
- func IsDash(cmd *cobra.Command) bool
- type ByDisplay
- type ByRune
- type ByValue
- type Group
- type Messages
- func (m *Messages) Add(s string)
- func (m Messages) Get() []string
- func (m Messages) Integrate(values RawValues, prefix string) RawValues
- func (m Messages) IsEmpty() bool
- func (m Messages) MarshalJSON() ([]byte, error)
- func (m *Messages) Merge(other Messages)
- func (m *Messages) Suppress(expr ...string) error
- func (m *Messages) UnmarshalJSON(data []byte) (err error)
- type Meta
- type Mock
- type RawValue
- type RawValues
- func (r RawValues) Decolor() RawValues
- func (r RawValues) EachTag(f func(tag string, values RawValues))
- func (r RawValues) Filter(values ...string) RawValues
- func (r RawValues) FilterPrefix(prefix string) RawValues
- func (r RawValues) Retain(values ...string) RawValues
- func (r RawValues) Unique() RawValues
- type SuffixMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var FromInvokedAction func(action interface{}) (Meta, RawValues)
FromInvokedAction provides access to RawValues within an InvokedAction. It is intended for testing purposes in Sandbox (circumventing dependency issues).
Functions ¶
Types ¶
type Messages ¶
type Messages struct {
// contains filtered or unexported fields
}
func (Messages) MarshalJSON ¶
func (*Messages) UnmarshalJSON ¶
type Meta ¶
type Meta struct { Messages Messages `json:"messages"` Nospace SuffixMatcher `json:"nospace"` Usage string `json:"usage"` }
type RawValue ¶
type RawValue struct { Value string `json:"value"` Display string `json:"display"` Description string `json:"description,omitempty"` Style string `json:"style,omitempty"` Tag string `json:"tag,omitempty"` Uid string `json:"uid,omitempty"` }
RawValue represents a completion candidate.
func (RawValue) TrimmedDescription ¶
TrimmedDescription returns the trimmed description.
type RawValues ¶
type RawValues []RawValue
RawValues is an alias for []RawValue.
func RawValuesFrom ¶
RawValuesFrom creates RawValues from given values.
func (RawValues) FilterPrefix ¶
FilterPrefix filters values with given prefix.
type SuffixMatcher ¶
type SuffixMatcher struct {
// contains filtered or unexported fields
}
func (*SuffixMatcher) Add ¶
func (sm *SuffixMatcher) Add(suffixes ...rune)
func (SuffixMatcher) MarshalJSON ¶
func (sm SuffixMatcher) MarshalJSON() ([]byte, error)
func (SuffixMatcher) Matches ¶
func (sm SuffixMatcher) Matches(s string) bool
func (*SuffixMatcher) Merge ¶
func (sm *SuffixMatcher) Merge(other SuffixMatcher)
func (*SuffixMatcher) UnmarshalJSON ¶
func (sm *SuffixMatcher) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.