todos

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTemplate = `` /* 366-byte string literal not displayed */

DefaultTemplate is the default report template

Variables

This section is empty.

Functions

func WriteTodos

func WriteTodos(todos ToDos, writer io.Writer) error

WriteTodos renders a report of todos

Types

type ToDo

type ToDo struct {
	comments.Comment
	String string
	Commit *object.Commit
}

ToDo represents a ToDo item

func NewToDo

func NewToDo(comment comments.Comment) *ToDo

NewToDo produces a pointer to a ToDo from a comment

func (*ToDo) TimeAgo added in v0.0.5

func (t *ToDo) TimeAgo() string

TimeAgo returns a human readable string indicating the time since the todo was added

type ToDos

type ToDos []*ToDo

ToDos represents a list of ToDo items

func NewToDos

func NewToDos(comments comments.Comments) ToDos

NewToDos produces a list of ToDos from a list of comments

func (*ToDos) CountWithCommits added in v0.0.5

func (t *ToDos) CountWithCommits() (count int)

CountWithCommits returns the number of todos with an associated commit (in which that todo was added)

func (*ToDos) FindBlame added in v0.0.5

func (t *ToDos) FindBlame(ctx context.Context, repo *git.Repository, from *object.Commit, cb func(*object.Commit, int)) error

FindBlame sets the blame information on each todo in a set of todos

func (*ToDos) Len added in v0.0.5

func (t *ToDos) Len() int

Len returns the number of todos

func (*ToDos) Less added in v0.0.5

func (t *ToDos) Less(i, j int) bool

Less compares two todos by their creation time

func (*ToDos) Swap added in v0.0.5

func (t *ToDos) Swap(i, j int)

Swap swaps two todoss

Jump to

Keyboard shortcuts

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