cmd

package
v0.0.0-...-a72572a Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	VersionFlag    VersionFlag    `name:"version" short:"V"`
	VersionCommand VersionCommand `cmd:"" name:"version"`

	Start    StartCmd    `cmd`
	Finish   FinishCmd   `cmd`
	Continue ContinueCmd `cmd`
	Delete   DeleteCmd   `cmd`
	Edit     EditCmd     `cmd`
	List     ListCmd     `cmd`

	File  string `type: existingfile default:"~/dl.sqlite"`
	Plain bool
}

type Context

type Context struct {
	File  string
	Plain bool
}

type ContinueCmd

type ContinueCmd struct {
	At string `default:"now"`
}

func (*ContinueCmd) Run

func (cmd *ContinueCmd) Run(app *kong.Kong, ctx *Context) error

type DeleteCmd

type DeleteCmd struct {
	ID int `default:-1`
}

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(app *kong.Kong, ctx *Context) error

type EditCmd

type EditCmd struct {
	Start       string
	Finish      string
	Project     string   `short:"p"`
	Description string   `short:"d"`
	Tags        []string `short:"t"`
	ID          int      `default:-1`
}

func (*EditCmd) Run

func (cmd *EditCmd) Run(app *kong.Kong, ctx *Context) error

type FinishCmd

type FinishCmd struct {
	At string `default:"now"`
}

func (*FinishCmd) Run

func (cmd *FinishCmd) Run(app *kong.Kong, ctx *Context) error

type ListCmd

type ListCmd struct{}

func (*ListCmd) Run

func (cmd *ListCmd) Run(app *kong.Kong, ctx *Context) error

type StartCmd

type StartCmd struct {
	Project     string   `required short:"p"`
	Description string   `required short:"d"`
	Tags        []string `short:"t"`
	At          string   `default:"now"`
}

func (*StartCmd) Run

func (cmd *StartCmd) Run(app *kong.Kong, ctx *Context) error

type VersionCommand

type VersionCommand struct{}

func (VersionCommand) Run

func (cmd VersionCommand) Run(app *kong.Kong, vars kong.Vars) error

type VersionFlag

type VersionFlag bool

func (VersionFlag) BeforeReset

func (flag VersionFlag) BeforeReset(app *kong.Kong, vars kong.Vars) error

Jump to

Keyboard shortcuts

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