docs(forge): improve top-level usage examples
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 07:22:52 +00:00
parent 8473c5676f
commit f8224ed05d
2 changed files with 5 additions and 3 deletions

View file

@ -4,8 +4,9 @@ package forge
//
// Usage:
//
// ctx := context.Background()
// f := forge.NewForge("https://forge.lthn.ai", "token")
// _ = f.Repos
// repo, err := f.Repos.Get(ctx, forge.Params{"owner": "core", "repo": "go-forge"})
type Forge struct {
client *Client
@ -35,8 +36,9 @@ type Forge struct {
//
// Usage:
//
// ctx := context.Background()
// f := forge.NewForge("https://forge.lthn.ai", "token")
// _ = f
// repos, err := f.Repos.ListOrgRepos(ctx, "core")
func NewForge(url, token string, opts ...Option) *Forge {
c := NewClient(url, token, opts...)
f := &Forge{client: c}

View file

@ -23,7 +23,7 @@ type ListOptions struct {
Limit int // items per page (default 50)
}
// DefaultList returns sensible default pagination.
// DefaultList provides sensible default pagination.
//
// Usage:
//