diff --git a/projectlist.go b/projectlist.go index 76f08e0..47b911b 100644 --- a/projectlist.go +++ b/projectlist.go @@ -55,6 +55,12 @@ func (projectlist *ProjectList) AddProject(project *Project) { projectlist.Projects[0] = project } +// AddProjects adds all passed projects to the list +func (projectlist *ProjectList) AddProjects(projects []*Project) { + projectlist.Projects = append(projectlist.Projects, projects...) +} +func (projectlist *ProjectList) Combine(other *ProjectList) { projectlist.AddProjects(other.Projects) } + // GetProject returns the Project with the given project 'id' form the ProjectList. // Returns an error if Project could not be found. func (projectlist *ProjectList) GetProject(id int) (*Project, error) {