added travis-ci build status
This commit is contained in:
parent
6d32f8e493
commit
434ae30216
13
.travis.yml
Normal file
13
.travis.yml
Normal file
@ -0,0 +1,13 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.1
|
||||
- 1.2
|
||||
- tip
|
||||
env:
|
||||
- GOARCH=amd64
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- jamesclonk@jamesclonk.ch
|
||||
on_success: change
|
||||
on_failure: always
|
26
README.md
26
README.md
@ -3,7 +3,7 @@ go-todotxt
|
||||
|
||||
A Go todo.txt library.
|
||||
|
||||
[![GoDoc](https://godoc.org/github.com/JamesClonk/go-todotxt?status.png)](https://godoc.org/github.com/JamesClonk/go-todotxt)
|
||||
[![GoDoc](https://godoc.org/github.com/JamesClonk/go-todotxt?status.png)](https://godoc.org/github.com/JamesClonk/go-todotxt) [![Build Status](https://travis-ci.org/JamesClonk/go-todotxt.png?branch=master)](https://travis-ci.org/JamesClonk/go-todotxt)
|
||||
|
||||
The *todotxt* package is a Go client library for Gina Trapani's [todo.txt](https://github.com/ginatrapani/todo.txt-cli/) files.
|
||||
It allows for parsing and manipulating of task lists and tasks in the todo.txt format.
|
||||
@ -18,7 +18,29 @@ go-todotxt requires Go1.1 or higher.
|
||||
|
||||
## Usage
|
||||
|
||||
...
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/JamesClonk/go-todotxt"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
todotxt.IgnoreComments = false
|
||||
|
||||
tasklist, err := todotxt.LoadFromFilename("todo.txt")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
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())
|
||||
fmt.Print(tasklist)
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user