Combine functions
This commit is contained in:
parent
dcfd80d082
commit
9ef6c61051
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user