diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-24 10:00:28 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-24 10:00:28 +0300 |
| commit | af8ab19f5def6f00081b0a6d1e5b20b76683f720 (patch) | |
| tree | 89ab045f8da4af0bb6af8b26e7851e7bddfad6e7 /internal/github | |
| parent | 577d3d37a47dc7279d7e56975448aa330d6b5469 (diff) | |
refactor: use value semantics for GitHub and Codeberg clients
- Changed github.NewClient() to return Client instead of *Client
- Changed codeberg.NewClient() to return Client instead of *Client
- Updated sync_handlers.go to handle value semantics properly
- Both clients only contain immutable string fields, making value semantics more appropriate
docs: add comprehensive documentation
- Added doc/ directory with full documentation
- Created architecture overview explaining system design
- Added complete API reference for all packages, types, and functions
- Created configuration guide with examples
- Added usage examples and common workflows
- Created development guide for contributors
- Updated README with links to documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/github')
| -rw-r--r-- | internal/github/github.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/github/github.go b/internal/github/github.go index 7d6213a..479bd54 100644 --- a/internal/github/github.go +++ b/internal/github/github.go @@ -18,7 +18,7 @@ type Client struct { } // NewClient creates a new GitHub API client -func NewClient(token, org string) *Client { +func NewClient(token, org string) Client { // If no token provided, try other sources if token == "" { fmt.Println(" No token in config, trying environment variable...") @@ -52,7 +52,7 @@ func NewClient(token, org string) *Client { } else { fmt.Printf(" Using token from config (length: %d)\n", len(token)) } - return &Client{ + return Client{ token: token, org: org, } |
