Documentation ¶
Index ¶
- func ShouldAddSuggest(command, suggest string) (string, bool)
- func SuggestSubCommand(command string, namespaces client.NamespaceNames, contexts []string) []string
- func ToLabels(s string) map[string]string
- type Interpreter
- func (c *Interpreter) Amend(c1 *Interpreter)
- func (c *Interpreter) Cmd() string
- func (c *Interpreter) ContextArg() (string, bool)
- func (c *Interpreter) CowArg() (string, bool)
- func (c *Interpreter) DirArg() (string, bool)
- func (c *Interpreter) FilterArg() (string, bool)
- func (c *Interpreter) GetLine() string
- func (c *Interpreter) HasContext() (string, bool)
- func (c *Interpreter) HasNS() bool
- func (c *Interpreter) IsAliasCmd() bool
- func (c *Interpreter) IsBailCmd() bool
- func (c *Interpreter) IsBlank() bool
- func (c *Interpreter) IsContextCmd() bool
- func (c *Interpreter) IsCowCmd() bool
- func (c *Interpreter) IsDirCmd() bool
- func (c *Interpreter) IsHelpCmd() bool
- func (c *Interpreter) IsRBACCmd() bool
- func (c *Interpreter) IsXrayCmd() bool
- func (c *Interpreter) LabelsArg() (map[string]string, bool)
- func (c *Interpreter) NSArg() (string, bool)
- func (c *Interpreter) RBACArgs() (string, string, bool)
- func (c *Interpreter) Reset(s string) *Interpreter
- func (c *Interpreter) ResetContextArg()
- func (c *Interpreter) XrayArgs() (string, string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldAddSuggest ¶
ShouldAddSuggest checks if a suggestion match the given command.
func SuggestSubCommand ¶
func SuggestSubCommand(command string, namespaces client.NamespaceNames, contexts []string) []string
SuggestSubCommand suggests namespaces or contexts based on current command.
Types ¶
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
func NewInterpreter ¶
func NewInterpreter(s string) *Interpreter
func (*Interpreter) Amend ¶
func (c *Interpreter) Amend(c1 *Interpreter)
func (*Interpreter) Cmd ¶
func (c *Interpreter) Cmd() string
func (*Interpreter) ContextArg ¶
func (c *Interpreter) ContextArg() (string, bool)
func (*Interpreter) CowArg ¶
func (c *Interpreter) CowArg() (string, bool)
func (*Interpreter) DirArg ¶
func (c *Interpreter) DirArg() (string, bool)
func (*Interpreter) FilterArg ¶
func (c *Interpreter) FilterArg() (string, bool)
func (*Interpreter) GetLine ¶
func (c *Interpreter) GetLine() string
func (*Interpreter) HasContext ¶
func (c *Interpreter) HasContext() (string, bool)
func (*Interpreter) HasNS ¶
func (c *Interpreter) HasNS() bool
func (*Interpreter) IsAliasCmd ¶
func (c *Interpreter) IsAliasCmd() bool
func (*Interpreter) IsBailCmd ¶
func (c *Interpreter) IsBailCmd() bool
func (*Interpreter) IsBlank ¶
func (c *Interpreter) IsBlank() bool
func (*Interpreter) IsContextCmd ¶
func (c *Interpreter) IsContextCmd() bool
func (*Interpreter) IsCowCmd ¶
func (c *Interpreter) IsCowCmd() bool
func (*Interpreter) IsDirCmd ¶
func (c *Interpreter) IsDirCmd() bool
func (*Interpreter) IsHelpCmd ¶
func (c *Interpreter) IsHelpCmd() bool
func (*Interpreter) IsRBACCmd ¶
func (c *Interpreter) IsRBACCmd() bool
func (*Interpreter) IsXrayCmd ¶
func (c *Interpreter) IsXrayCmd() bool
func (*Interpreter) NSArg ¶
func (c *Interpreter) NSArg() (string, bool)
func (*Interpreter) Reset ¶
func (c *Interpreter) Reset(s string) *Interpreter
func (*Interpreter) ResetContextArg ¶
func (c *Interpreter) ResetContextArg()
Click to show internal directories.
Click to hide internal directories.