Documentation ¶
Index ¶
- Variables
- func NewExport() cli.CommandFactory
- func NewParse() cli.CommandFactory
- func NewShow() cli.CommandFactory
- func NewTabWriter() *tabwriter.Writer
- func NewVersion(version string) cli.CommandFactory
- func NewWeb() cli.CommandFactory
- type Export
- type Exporter
- type FileTodos
- type Parse
- type Priority
- type PriorityTodos
- type Show
- type TimestampTodos
- type Todo
- type Todoer
- type UserTodos
- type Version
- type Web
Constants ¶
This section is empty.
Variables ¶
var Format = "2006-01-02T15:04"
Format represents how timestamps show look
var Priorities = map[int]string{
5: "Not at all important",
4: "Slightly important",
3: "Moderately important",
2: "Somewhat important",
1: "Extremely important",
}
Priorities represents the group of priorities TODO-View represents
Functions ¶
func NewTabWriter ¶
NewTabWriter sets up a new and configured tabwriter
func NewVersion ¶
func NewVersion(version string) cli.CommandFactory
NewVersion creates a new version command
Types ¶
type Export ¶
type Export struct{}
Export is used for a command base
type FileTodos ¶
type FileTodos []Todo
FileTodos is a slice type made for easier sorting
type Parse ¶
type Parse struct{}
Parse type for command
type PriorityTodos ¶
type PriorityTodos []Todo
PriorityTodos is a slice type made for easier sorting
func (PriorityTodos) Less ¶
func (w PriorityTodos) Less(i, j int) bool
Less does a comparison of the 2 given arguments
func (PriorityTodos) Swap ¶
func (w PriorityTodos) Swap(i, j int)
Swap switchs the place in the slice for the 2 given arguments
type Show ¶
type Show struct{}
Show represents the show command
type TimestampTodos ¶
type TimestampTodos []Todo
TimestampTodos is a slice type made for easier sorting
func (TimestampTodos) Less ¶
func (t TimestampTodos) Less(i, j int) bool
Less does a comparison of the 2 given arguments
func (TimestampTodos) Swap ¶
func (t TimestampTodos) Swap(i, j int)
Swap switchs the place in the slice for the 2 given arguments
type Todo ¶
type Todo struct {
// contains filtered or unexported fields
}
Todo represents a todo
type Todoer ¶
type Todoer interface { User() string File() string Message() string Timestamp() time.Time // contains filtered or unexported methods }
Todoer implements the functionality to view todos
type UserTodos ¶
type UserTodos []Todo
UserTodos is a slice type made for easier sorting
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version represents the version command