MCPcopy Index your code
hub / github.com/google/go-github / ListOrganizationProjectsIter

Method ListOrganizationProjectsIter

github/github-iterators.go:4863–4891  ·  view source on GitHub ↗

ListOrganizationProjectsIter returns an iterator that paginates through all results of ListOrganizationProjects.

(ctx context.Context, org string, opts *ListProjectsOptions)

Source from the content-addressed store, hash-verified

4861
4862// ListOrganizationProjectsIter returns an iterator that paginates through all results of ListOrganizationProjects.
4863func (s *ProjectsService) ListOrganizationProjectsIter(ctx context.Context, org string, opts *ListProjectsOptions) iter.Seq2[*ProjectV2, error] {
4864 return func(yield func(*ProjectV2, error) bool) {
4865 // Create a copy of opts to avoid mutating the caller's struct
4866 if opts == nil {
4867 opts = &ListProjectsOptions{}
4868 } else {
4869 opts = Ptr(*opts)
4870 }
4871
4872 for {
4873 results, resp, err := s.ListOrganizationProjects(ctx, org, opts)
4874 if err != nil {
4875 yield(nil, err)
4876 return
4877 }
4878
4879 for _, item := range results {
4880 if !yield(item, nil) {
4881 return
4882 }
4883 }
4884
4885 if resp.After == "" {
4886 break
4887 }
4888 opts.After = resp.After
4889 }
4890 }
4891}
4892
4893// ListUserProjectFieldsIter returns an iterator that paginates through all results of ListUserProjectFields.
4894func (s *ProjectsService) ListUserProjectFieldsIter(ctx context.Context, user string, projectNumber int, opts *ListProjectsOptions) iter.Seq2[*ProjectV2Field, error] {

Calls 2

PtrFunction · 0.70