cmd

package
v0.0.0-...-cbd24a7 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoArgs    = errors.New("no arguments provided")
	ErrNoMatches = errors.New("no matches")
	ErrRange     = errors.New("out of range")
)
View Source
var Add = &cli.Command{
	Name:      "add",
	Usage:     "Create a new task",
	ArgsUsage: "(<arg> | <prop>:<value>)...",
	Description: `Create a new task.

If the property name <prop> is not defined in the schema,
the argument will be interpreted as an <arg> instead.
<arg> is used as the default property value."`,
	Action: runAdd,
}
View Source
var Del = &cli.Command{
	Name:      "del",
	Usage:     "Delete tasks",
	ArgsUsage: "(<id> | <range>)...",
	Action:    runDel,
}
View Source
var Get = &cli.Command{
	Name:      "get",
	Usage:     "Display tasks",
	ArgsUsage: "(<id> | <range> | <filter>)...",
	Action:    runGet,
}
View Source
var GlobalFlags = []cli.Flag{
	&cli.StringFlag{
		Name:  "config",
		Usage: "load config from `PATH`",
	},
}
View Source
var Set = &cli.Command{
	Name:      "set",
	Usage:     "Modify a task",
	ArgsUsage: "<id> (<arg> | <prop>:<value>)...",
	Description: `Modify a task.

If the property name <prop> is not defined in the schema,
the argument will be interpreted as an <arg> instead.
<arg> is used as the default property value."`,
	Action: runSet,
}

Functions

func Init

func Init(ctx *cli.Context) error

Types

type Range

type Range struct {
	Min, Max int
}

func (*Range) Within

func (r *Range) Within(n int) bool

Jump to

Keyboard shortcuts

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