todos

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
	Phrase string
	Blame  *blame.Blame
}

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

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

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

func (t *ToDos) FindBlame(ctx context.Context, dir string) error

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

func (ToDos) Len

func (t ToDos) Len() int

Len returns the number of todos

func (ToDos) Less

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

Less compares two todos by their creation time

func (ToDos) Swap

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

Swap swaps two todos

Jump to

Keyboard shortcuts

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