refactor(module): migrate module path to dappco.re/go/core/forge
All checks were successful
Security Scan / security (pull_request) Successful in 9s
Test / test (pull_request) Successful in 1m20s

Update Go module path from forge.lthn.ai/core/go-forge to
dappco.re/go/core/forge. Migrate all import paths and dependency
references (go-io → dappco.re/go/core/io, go-log → dappco.re/go/core/log).
Update documentation (CLAUDE.md, README.md, docs/) to reflect new paths.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-22 01:51:29 +00:00
parent 83b4f9da90
commit 0a9564274d
47 changed files with 62 additions and 58 deletions

View file

@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
Full-coverage Go client for the Forgejo API (~450 endpoints). Uses a generic `Resource[T,C,U]` pattern for CRUD operations and types generated from `swagger.v1.json`. Full-coverage Go client for the Forgejo API (~450 endpoints). Uses a generic `Resource[T,C,U]` pattern for CRUD operations and types generated from `swagger.v1.json`.
**Module:** `forge.lthn.ai/core/go-forge` (Go 1.26, depends on `go-io` and `go-log`) **Module:** `dappco.re/go/core/forge` (Go 1.26, depends on `go-io` and `go-log`)
## Build & Test ## Build & Test
@ -51,8 +51,8 @@ The library is a flat package (`package forge`) with a layered design:
- All methods accept `context.Context` as first parameter - All methods accept `context.Context` as first parameter
- Errors wrapped as `*APIError` with StatusCode, Message, URL; use `IsNotFound()`, `IsForbidden()`, `IsConflict()` helpers - Errors wrapped as `*APIError` with StatusCode, Message, URL; use `IsNotFound()`, `IsForbidden()`, `IsConflict()` helpers
- Internal errors use `coreerr.E()` from `go-log` (imported as `coreerr "forge.lthn.ai/core/go-log"`), never `fmt.Errorf` or `errors.New` - Internal errors use `coreerr.E()` from `go-log` (imported as `coreerr "dappco.re/go/core/log"`), never `fmt.Errorf` or `errors.New`
- File I/O uses `go-io` (imported as `coreio "forge.lthn.ai/core/go-io"`), never `os.ReadFile`/`os.WriteFile`/`os.MkdirAll` - File I/O uses `go-io` (imported as `coreio "dappco.re/go/core/io"`), never `os.ReadFile`/`os.WriteFile`/`os.MkdirAll`
- UK English in comments (organisation, colour, etc.) - UK English in comments (organisation, colour, etc.)
- `Co-Authored-By: Virgil <virgil@lethean.io>` in commits - `Co-Authored-By: Virgil <virgil@lethean.io>` in commits
- `Client` uses functional options pattern (`WithHTTPClient`, `WithUserAgent`) - `Client` uses functional options pattern (`WithHTTPClient`, `WithUserAgent`)

View file

@ -1,10 +1,10 @@
[![Go Reference](https://pkg.go.dev/badge/forge.lthn.ai/core/go-forge.svg)](https://pkg.go.dev/forge.lthn.ai/core/go-forge) [![Go Reference](https://pkg.go.dev/badge/dappco.re/go/core/forge.svg)](https://pkg.go.dev/dappco.re/go/core/forge)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE.md) [![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE.md)
[![Go Version](https://img.shields.io/badge/Go-1.26-00ADD8?style=flat&logo=go)](go.mod) [![Go Version](https://img.shields.io/badge/Go-1.26-00ADD8?style=flat&logo=go)](go.mod)
# go-forge # go-forge
Go module: `forge.lthn.ai/core/go-forge` Go module: `dappco.re/go/core/forge`
## License ## License

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// ActionsService handles CI/CD actions operations across repositories and // ActionsService handles CI/CD actions operations across repositories and

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestActionsService_Good_ListRepoSecrets(t *testing.T) { func TestActionsService_Good_ListRepoSecrets(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// AdminService handles site administration operations. // AdminService handles site administration operations.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestAdminService_Good_ListUsers(t *testing.T) { func TestAdminService_Good_ListUsers(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// BranchService handles branch operations within a repository. // BranchService handles branch operations within a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestBranchService_Good_List(t *testing.T) { func TestBranchService_Good_List(t *testing.T) {

View file

@ -11,7 +11,7 @@ import (
"strconv" "strconv"
"strings" "strings"
coreerr "forge.lthn.ai/core/go-log" coreerr "dappco.re/go/core/log"
) )
// APIError represents an error response from the Forgejo API. // APIError represents an error response from the Forgejo API.

View file

@ -8,8 +8,8 @@ import (
"strings" "strings"
"text/template" "text/template"
coreio "forge.lthn.ai/core/go-io" coreio "dappco.re/go/core/io"
coreerr "forge.lthn.ai/core/go-log" coreerr "dappco.re/go/core/log"
) )
// typeGrouping maps type name prefixes to output file names. // typeGrouping maps type name prefixes to output file names.

View file

@ -6,7 +6,7 @@ import (
"strings" "strings"
"testing" "testing"
coreio "forge.lthn.ai/core/go-io" coreio "dappco.re/go/core/io"
) )
func TestGenerate_Good_CreatesFiles(t *testing.T) { func TestGenerate_Good_CreatesFiles(t *testing.T) {

View file

@ -6,8 +6,8 @@ import (
"slices" "slices"
"strings" "strings"
coreio "forge.lthn.ai/core/go-io" coreio "dappco.re/go/core/io"
coreerr "forge.lthn.ai/core/go-log" coreerr "dappco.re/go/core/log"
) )
// Spec represents a Swagger 2.0 specification document. // Spec represents a Swagger 2.0 specification document.

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// CommitService handles commit-related operations such as commit statuses // CommitService handles commit-related operations such as commit statuses

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestCommitService_Good_ListStatuses(t *testing.T) { func TestCommitService_Good_ListStatuses(t *testing.T) {

View file

@ -3,7 +3,7 @@ package forge
import ( import (
"os" "os"
coreerr "forge.lthn.ai/core/go-log" coreerr "dappco.re/go/core/log"
) )
const ( const (

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// ContentService handles file read/write operations via the Forgejo API. // ContentService handles file read/write operations via the Forgejo API.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestContentService_Good_GetFile(t *testing.T) { func TestContentService_Good_GetFile(t *testing.T) {

View file

@ -5,9 +5,9 @@ description: Full-coverage Go client for the Forgejo API with generics-based CRU
# go-forge # go-forge
`forge.lthn.ai/core/go-forge` is a Go client library for the [Forgejo](https://forgejo.org) REST API. It provides typed access to 18 API domains (repositories, issues, pull requests, organisations, and more) through a single top-level `Forge` client. Types are generated directly from Forgejo's `swagger.v1.json` specification, keeping the library in lockstep with the server. `dappco.re/go/core/forge` is a Go client library for the [Forgejo](https://forgejo.org) REST API. It provides typed access to 18 API domains (repositories, issues, pull requests, organisations, and more) through a single top-level `Forge` client. Types are generated directly from Forgejo's `swagger.v1.json` specification, keeping the library in lockstep with the server.
**Module path:** `forge.lthn.ai/core/go-forge` **Module path:** `dappco.re/go/core/forge`
**Go version:** 1.26+ **Go version:** 1.26+
**Licence:** EUPL-1.2 **Licence:** EUPL-1.2
@ -22,7 +22,7 @@ import (
"fmt" "fmt"
"log" "log"
"forge.lthn.ai/core/go-forge" "dappco.re/go/core/forge"
) )
func main() { func main() {
@ -145,7 +145,7 @@ Services that embed `Resource[T, C, U]` inherit `List`, `ListAll`, `Iter`, `Get`
This module has **zero external dependencies**. It relies solely on the Go standard library (`net/http`, `encoding/json`, `context`, `iter`, etc.) and requires Go 1.26 or later. This module has **zero external dependencies**. It relies solely on the Go standard library (`net/http`, `encoding/json`, `context`, `iter`, etc.) and requires Go 1.26 or later.
``` ```
module forge.lthn.ai/core/go-forge module dappco.re/go/core/forge
go 1.26.0 go 1.26.0
``` ```

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestForge_Good_NewForge(t *testing.T) { func TestForge_Good_NewForge(t *testing.T) {

8
go.mod
View file

@ -1,8 +1,10 @@
module forge.lthn.ai/core/go-forge module dappco.re/go/core/forge
go 1.26.0 go 1.26.0
require ( require (
forge.lthn.ai/core/go-io v0.1.7 dappco.re/go/core/io v0.2.0
forge.lthn.ai/core/go-log v0.0.4 dappco.re/go/core/log v0.1.0
) )
require forge.lthn.ai/core/go-log v0.0.4 // indirect

6
go.sum
View file

@ -1,5 +1,7 @@
forge.lthn.ai/core/go-io v0.1.7 h1:Tdb6sqh+zz1lsGJaNX9RFWM6MJ/RhSAyxfulLXrJsbk= dappco.re/go/core/io v0.2.0 h1:zuudgIiTsQQ5ipVt97saWdGLROovbEB/zdVyy9/l+I4=
forge.lthn.ai/core/go-io v0.1.7/go.mod h1:8lRLFk4Dnp5cR/Cyzh9WclD5566TbpdRgwcH7UZLWn4= dappco.re/go/core/io v0.2.0/go.mod h1:1QnQV6X9LNgFKfm8SkOtR9LLaj3bDcsOIeJOOyjbL5E=
dappco.re/go/core/log v0.1.0 h1:pa71Vq2TD2aoEUQWFKwNcaJ3GBY8HbaNGqtE688Unyc=
dappco.re/go/core/log v0.1.0/go.mod h1:Nkqb8gsXhZAO8VLpx7B8i1iAmohhzqA20b9Zr8VUcJs=
forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0= forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0=
forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw= forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// IssueService handles issue operations within a repository. // IssueService handles issue operations within a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestIssueService_Good_List(t *testing.T) { func TestIssueService_Good_List(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// LabelService handles repository labels, organisation labels, and issue labels. // LabelService handles repository labels, organisation labels, and issue labels.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestLabelService_Good_ListRepoLabels(t *testing.T) { func TestLabelService_Good_ListRepoLabels(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// MiscService handles miscellaneous Forgejo API endpoints such as // MiscService handles miscellaneous Forgejo API endpoints such as

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestMiscService_Good_RenderMarkdown(t *testing.T) { func TestMiscService_Good_RenderMarkdown(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// NotificationService handles notification operations via the Forgejo API. // NotificationService handles notification operations via the Forgejo API.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestNotificationService_Good_List(t *testing.T) { func TestNotificationService_Good_List(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// OrgService handles organisation operations. // OrgService handles organisation operations.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestOrgService_Good_List(t *testing.T) { func TestOrgService_Good_List(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// PackageService handles package registry operations via the Forgejo API. // PackageService handles package registry operations via the Forgejo API.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestPackageService_Good_List(t *testing.T) { func TestPackageService_Good_List(t *testing.T) {

View file

@ -7,7 +7,7 @@ import (
"net/url" "net/url"
"strconv" "strconv"
coreerr "forge.lthn.ai/core/go-log" coreerr "dappco.re/go/core/log"
) )
// ListOptions controls pagination. // ListOptions controls pagination.

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// PullService handles pull request operations within a repository. // PullService handles pull request operations within a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestPullService_Good_List(t *testing.T) { func TestPullService_Good_List(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// ReleaseService handles release operations within a repository. // ReleaseService handles release operations within a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestReleaseService_Good_List(t *testing.T) { func TestReleaseService_Good_List(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// RepoService handles repository operations. // RepoService handles repository operations.

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// TeamService handles team operations. // TeamService handles team operations.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestTeamService_Good_Get(t *testing.T) { func TestTeamService_Good_Get(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// UserService handles user operations. // UserService handles user operations.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestUserService_Good_Get(t *testing.T) { func TestUserService_Good_Get(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"iter" "iter"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// WebhookService handles webhook (hook) operations within a repository. // WebhookService handles webhook (hook) operations within a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestWebhookService_Good_List(t *testing.T) { func TestWebhookService_Good_List(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
// WikiService handles wiki page operations for a repository. // WikiService handles wiki page operations for a repository.

View file

@ -7,7 +7,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"forge.lthn.ai/core/go-forge/types" "dappco.re/go/core/forge/types"
) )
func TestWikiService_Good_ListPages(t *testing.T) { func TestWikiService_Good_ListPages(t *testing.T) {