Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c73b01c
feat: Add native Go 1.23 Iterator support
merchantmoh-debug Jan 24, 2026
313fd90
fix: remove duplicate comments and unused context in template
merchantmoh-debug Jan 24, 2026
feaca75
fix(tools): exclude *Iter methods from metadata validation
merchantmoh-debug Jan 24, 2026
930f6e1
fix: force update to clear potential merge resolution artifacts
merchantmoh-debug Jan 24, 2026
c27faaa
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 24, 2026
a86a89e
Apply suggestion from @gmlewis
gmlewis Jan 24, 2026
fd43866
fix: remove trailing null byte
merchantmoh-debug Jan 24, 2026
406d023
Regenerate iterators and fix formatting
merchantmoh-debug Jan 24, 2026
55bdc04
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 25, 2026
6d1d5b4
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 26, 2026
37eea04
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 27, 2026
194d0ee
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 28, 2026
44fee1c
Update github/gen-iterators.go
merchantmoh-debug Jan 28, 2026
78d5cf1
Update github/gen-iterators.go
merchantmoh-debug Jan 28, 2026
e10b9f5
Update github/gen-iterators.go
merchantmoh-debug Jan 28, 2026
86cb830
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Jan 31, 2026
ccef8d7
Merge branch 'master' into bolt-sentinel-client-improvement-109997907…
merchantmoh-debug Feb 1, 2026
9ae96fa
Update github/iterators_gen_test.go
gmlewis Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions github/example_iterators_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2026 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github_test

import (
"context"
"fmt"
"log"

"github.com/google/go-github/v82/github"
)

func ExampleRepositoriesService_ListByUserIter() {
client := github.NewClient(nil)
ctx := context.Background()

// List all repositories for a user using the iterator.
// This automatically handles pagination.
// Note that if `opts` is `nil`, a new empty `opts` will be created and used within the iterator.
opts := &github.RepositoryListByUserOptions{Type: "public"}
for repo, err := range client.Repositories.ListByUserIter(ctx, "octocat", opts) {
if err != nil {
log.Fatalf("Error listing repos: %v", err)
}
fmt.Println(repo.GetName())
}
}
Loading
Loading