task

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorEmptyName = errors.New("No name provided")
View Source
var ErrorFindMultipleFlags = errors.New("Cannot search using multiple flags")
View Source
var ErrorFindWithoutTag = errors.New("Tags not provided")
View Source
var ErrorInvalidDate = errors.New("Invalid task date format, use YYYY-MM-DD format")
View Source
var ErrorMainBranch = errors.New("Cannot use `main`/`master` as task name")
View Source
var ErrorNotInGitRepo = errors.New("Command was not run in git repo")
View Source
var ErrorParseInvalidCreatedDate = errors.New("Parsing Error: invalid task created date. Need to be in `YYYY-MM-DD HH:mm:ss` format")

Functions

This section is empty.

Types

type Task

type Task struct {
	ID      int
	Created time.Time
	Name    string
	IssueId string   // optional
	Repo    string   // optional
	Branch  string   // optional
	Tags    []string // optional
}

func GitToTask

func GitToTask(branch, repoName string) Task

func NewTask

func NewTask(name string, date time.Time, tags []string) Task

func NewTaskFromGit

func NewTaskFromGit(branch, repo string, created time.Time) Task

func NewTaskFromStr

func NewTaskFromStr(text string, lineNumber int) Task

func StrToTask

func StrToTask(text string, id int) (Task, error)

func (Task) GetFormattedBranch

func (t Task) GetFormattedBranch() string

func (Task) GetFormattedCreated

func (t Task) GetFormattedCreated() string

func (Task) GetFormattedCreatedDate

func (t Task) GetFormattedCreatedDate() string

func (Task) GetFormattedCreatedTime

func (t Task) GetFormattedCreatedTime() string

func (Task) GetFormattedId

func (t Task) GetFormattedId() string

func (Task) GetFormattedIssueId

func (t Task) GetFormattedIssueId() string

func (Task) GetFormattedName

func (t Task) GetFormattedName() string

func (Task) GetFormattedRepo

func (t Task) GetFormattedRepo() string

func (Task) GetFormattedTags

func (t Task) GetFormattedTags() string

func (Task) MatchId

func (t Task) MatchId(id int) bool

func (Task) MatchTags added in v1.3.0

func (t Task) MatchTags(tags []string) bool

func (Task) ToString

func (t Task) ToString() string

Jump to

Keyboard shortcuts

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