Beispiel #1
0
func ProjectNotes(writer io.Writer, indent int, project *data.Project) {
	if len(project.Notes()) == 0 {
		return
	}

	HeaderProject(writer, indent+1, project)
	Notes(writer, indent+2, project.Notes())
}
Beispiel #2
0
func Project(writer io.Writer, indent int, project *data.Project) {
	todos := project.Todos()
	notes := project.Notes()

	if len(todos) == 0 && len(notes) == 0 {
		return
	}

	HeaderProject(writer, indent+1, project)

	if len(todos) != 0 {
		HeaderTodos(writer, indent+2)
		Todos(writer, todos)
	}

	if len(notes) != 0 {
		HeaderNotes(writer, indent+2)
		Notes(writer, indent+3, notes)
	}
}