From af8ab19f5def6f00081b0a6d1e5b20b76683f720 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 24 Jun 2025 10:00:28 +0300 Subject: refactor: use value semantics for GitHub and Codeberg clients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- internal/codeberg/codeberg.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/codeberg') diff --git a/internal/codeberg/codeberg.go b/internal/codeberg/codeberg.go index 288d1e7..4f0a76d 100644 --- a/internal/codeberg/codeberg.go +++ b/internal/codeberg/codeberg.go @@ -30,10 +30,9 @@ type Client struct { org string } -// CLAUDE: Is there a rason, that we return a pointer of Client? // NewClient creates a new Codeberg API client -func NewClient(org string) *Client { - return &Client{ +func NewClient(org string) Client { + return Client{ baseURL: "https://codeberg.org/api/v1", org: org, } -- cgit v1.2.3