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 ¶ added in v0.28.0
type Messages struct {
// contains filtered or unexported fields
}
func (Messages) MarshalJSON ¶ added in v0.28.0
func (*Messages) UnmarshalJSON ¶ added in v0.28.0
type Meta ¶ added in v0.28.0
type Meta struct { Messages Messages `json:"messages"` Nospace SuffixMatcher `json:"nospace"` Usage string `json:"usage"` }
type RawValue ¶ added in v0.2.4
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"` }
RawValue represents a completion candidate.
func (RawValue) TrimmedDescription ¶ added in v0.5.8
TrimmedDescription returns the trimmed description.
type RawValues ¶ added in v0.5.0
type RawValues []RawValue
RawValues is an alias for []RawValue.
func RawValuesFrom ¶ added in v0.2.4
RawValuesFrom creates RawValues from given values.
func (RawValues) FilterPrefix ¶ added in v0.5.0
FilterPrefix filters values with given prefix.
type SuffixMatcher ¶ added in v0.26.0
type SuffixMatcher struct {
// contains filtered or unexported fields
}
func (*SuffixMatcher) Add ¶ added in v0.26.0
func (sm *SuffixMatcher) Add(suffixes ...rune)
func (SuffixMatcher) MarshalJSON ¶ added in v0.28.1
func (sm SuffixMatcher) MarshalJSON() ([]byte, error)
func (SuffixMatcher) Matches ¶ added in v0.26.0
func (sm SuffixMatcher) Matches(s string) bool
func (*SuffixMatcher) Merge ¶ added in v0.28.1
func (sm *SuffixMatcher) Merge(other SuffixMatcher)
func (*SuffixMatcher) UnmarshalJSON ¶ added in v0.28.1
func (sm *SuffixMatcher) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.