You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brian Buller d253a6b8b7 Really fix the useful sorting 7 months ago
testdata fix overdue test case 4 years ago
.gitignore Initial commit 8 years ago
.travis.yml added travis-ci build status 8 years ago
LICENSE initial commit, begin working on library 8 years ago Update 3 years ago
example_test.go added Complete() and Reopen() to Task. 8 years ago
sort.go Really fix the useful sorting 7 months ago
sort_test.go forgot header 8 years ago
task.go Added new methods on TaskList. 8 years ago
task_test.go Work in progress 8 years ago
todo.txt work in progress 8 years ago
todotxt.go Use pointers to task lists 3 years ago
todotxt_test.go GetTask bugfix 8 years ago


A Go todo.txt library.

The todotxt package is a Go client library for Gina Trapani's todo.txt files. It allows for parsing and manipulating of task lists and tasks in the todo.txt format.


$ go get


go-todotxt requires Go1.1 or higher.


	package main

	import (

	func main() {
		todotxt.IgnoreComments = false

		tasklist, err := todotxt.LoadFromFilename("todo.txt")
		if err != nil {

		// tasklist now contains a slice of Tasks
		fmt.Printf("Task 2, todo: %v\n", tasklist[1].Todo)
		fmt.Printf("Task 3: %v\n", tasklist[2])
		fmt.Printf("Task 4, has priority: %v\n\n", tasklist[3].HasPriority())

		// Filter list to get only completed tasks
		completedList := tasklist.Filter(func(t Task) bool {
			return t.Completed 

		// Add a new empty Task to tasklist
		task := NewTask()

		// Or a parsed Task from a string
		parsedTask, _ := ParseTask("x (C) 2014-01-01 Create golang library documentation @Go +go-todotxt due:2014-01-12")

		// Update an existing task
		task, _ := tasklist.GetTask(2) // Task pointer
		task.Todo = "Do something different.."


See GoDoc - Documentation for further documentation.


The source files are distributed under the Mozilla Public License, version 2.0, unless otherwise noted.
Please read the FAQ if you have further questions regarding the license.