func ProjectTodos(writer io.Writer, indent int, project *data.Project) { if len(project.Todos()) == 0 { return } HeaderProject(writer, indent+1, project) Todos(writer, project.Todos()) }
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) } }