Fully Initialize on New
This commit is contained in:
parent
c0e6b72ed3
commit
dcfd80d082
@ -13,17 +13,9 @@ type ProjectList struct {
|
||||
Projects []*Project `json:"projects"`
|
||||
}
|
||||
|
||||
func NewProjectList() *ProjectList {
|
||||
return &ProjectList{}
|
||||
}
|
||||
|
||||
func (projectlist *ProjectList) Size() int {
|
||||
return len(projectlist.Projects)
|
||||
}
|
||||
|
||||
func (projectlist *ProjectList) GetProjectSlice() []*Project {
|
||||
return projectlist.Projects
|
||||
}
|
||||
func NewProjectList() *ProjectList { return &ProjectList{Projects: []*Project{}} }
|
||||
func (projectlist *ProjectList) Size() int { return len(projectlist.Projects) }
|
||||
func (projectlist *ProjectList) GetProjectSlice() []*Project { return projectlist.Projects }
|
||||
|
||||
func (projectlist *ProjectList) GetProjectsWithContext(context string) *ProjectList {
|
||||
return projectlist.Filter(func(p *Project) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user