{
"code": 400,
"message": "Invalid JSON",
"errors": [
{
"key": "due",
"value": "gabagoo",
"message": "Does not match format 'rfc3339'"
}
]
}
Tests
go test -covermode=count -coverprofile=count.out ./...
go tool cover -func=count.out # Display coverage info in shell
go tool cover -html=count.out # Display coverage info in browser
go test ./... -cover # Run entire test suite and print coverage %
go test -run TestTodo -v # Run single test in verbose mode
go test -run Handler/DELETE -v # Run DELETE subtest
go test -run Handler/LIST=all -v # Run LIST=all subtest
NOTES:
Comparing Due dates with time.Unix(). Fix!
If the declared column type is TIMESTAMP, go-sqlite3 attemps to handle time.Time instances for you. INSERT and UPDATE operations convert time.Time to UTC; however, SELECT queries do not perform this conversion automatically. See sqlite3 doesn't have datetime/timestamp types #748