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