Documentation ¶
Overview ¶
Package cmds contains the commands for the CLI.
Each file in this package represents a command for the CLI.
The commands are defined using the cobra library.
The commands are registered with the root command using the AddCommands function. (similar to using a `routes.go` in a web application)
Index ¶
- func CreateConfigDir(dirPath string) (string, error)
- func NewCompletionCmd(ctx context.Context, w io.Writer, r io.Reader) *cobra.Command
- func NewLSPCmd(ctx context.Context, writer io.Writer, reader io.Reader, handle LSPHandler, ...) *cobra.Command
- func NewStaticCmd(_ context.Context) *cobra.Command
- func NewVersionCmd() *cobra.Command
- func NewVetCmd(ctx context.Context, w io.Writer, r io.Reader) *cobra.Command
- func TestFileString(tmpl testfileTemplate) (string, error)
- type LSPHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfigDir ¶
CreateConfigDir creates a new config directory and returns the path.
func NewCompletionCmd ¶
NewCompletionCmd returns the completion command
func NewLSPCmd ¶
func NewLSPCmd( ctx context.Context, writer io.Writer, reader io.Reader, handle LSPHandler, db *data.Database[master.Queries], ) *cobra.Command
NewLSPCmd creates a new command for the lsp subcommand
func NewStaticCmd ¶
NewStaticCmd createa a new command for the static command.
func NewVetCmd ¶
NewVetCmd returns the vet command which evaluates code for common errors or invalid selectors.
Similar to go vet, but for seltabl defined structs.
func TestFileString ¶
TestFileString returns a string for a test file.