cmd

package
v0.0.0-...-bf6e1ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cmd holds the command line, built on cobra.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "dict [query]",
	Short: "look up how a word is spelled, and what it means",
	Long: calvin.AsciiFont("dict") + "\n" +
		"look up how a word is spelled, and what it means.\n" +
		"the word list and all eight dictionaries are built into this binary;\n" +
		"nothing needs to be installed.",
	Example: "  dict recieve          search interactively, starting from a misspelling\n" +
		"  dict -d receive       print the definition and exit\n" +
		"  dict -R               a random word and what it means\n" +
		"  dict -f -n 5 acheive  print the five best matches",
	Args:                  cobra.ArbitraryArgs,
	SilenceErrors:         true,
	SilenceUsage:          true,
	DisableSuggestions:    true,
	DisableFlagsInUseLine: true,
	RunE:                  run,
	Version:               Version,
}

RootCmd is the root command

View Source
var Version = "dev"

Version is overridden at build time with -ldflags -X ...cmd.Version=...

Functions

func Execute

func Execute() error

Execute executes the root cli command

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL