Full-coverage Go client for the Forgejo API (450 endpoints)
Find a file
Snider 29ddc897f6
Some checks failed
security-scan.yml / refactor(forge): migrate NewFromConfig + NewForgeFromConfig to core.Result (Mantis #1391) (push) Failing after 0s
test.yml / refactor(forge): migrate NewFromConfig + NewForgeFromConfig to core.Result (Mantis #1391) (push) Failing after 0s
refactor(forge): migrate NewFromConfig + NewForgeFromConfig to core.Result (Mantis #1391)
Both config-based constructors now return core.Result instead of
(*Forge, error). Body uses defer-recover for panic safety + explicit
core.Fail/core.Ok at every branch — same shape validated in #1390
(go-webview).

Validates the migration shape generalises from Options-style constructors
(go-webview's New(opts ...Option)) to config-based constructors
(NewFromConfig(flagURL, flagToken string)).

Caller pattern at all callsites:

  r := forge.NewFromConfig(url, token)
  if !r.OK { return r }
  f := r.Value.(*Forge)

Changes:
- config.go: NewForgeFromConfig + NewFromConfig migrated; docstrings
  AX-tightened with Result-shape examples.
- config_test.go: TestNewFromConfig_Good + TestNewForgeFromConfig_NoToken_Bad
  callsites migrated.
- ax7_generated_test.go: 6 generator-emitted callsites migrated
  (3x NewFromConfig + 3x NewForgeFromConfig — Good/Bad/Ugly variants).
  Switched from core.AssertNoError(t, err) / core.AssertError(t, err) to
  core.AssertTrue(t, r.OK) / core.AssertFalse(t, r.OK).

Verification:
- GOWORK=off go build ./... clean (production build passes)
- Test runtime verification BLOCKED by pre-existing AX7 generator output
  rot — see Mantis #1392 (24+ test files missing core import + generic
  type instantiation bugs in pagination_*_test.go). Migration is sound;
  test verification deferred until #1392 lands.

Mantis #1391 (child of #1389). Sister: #1390 (go-webview, closed).
Filed: #1392 (AX7 generator output rot blocking tests).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-05-11 05:58:06 +01:00
.core chore: add .core/ build and release configs 2026-03-06 18:52:36 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:02 +00:00
.github/workflows ci: add Core ecosystem CI workflow with CodeRabbit auto-fix 2026-03-17 14:05:38 +00:00
docs feat(forge): expose HTTP client metadata 2026-04-02 07:35:37 +00:00
external chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:39:51 +01:00
go refactor(forge): migrate NewFromConfig + NewForgeFromConfig to core.Result (Mantis #1391) 2026-05-11 05:58:06 +01:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:34 +00:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:49 +00:00
.gitmodules refactor(go): restructure to /go/ subtree (Phase 1, Mantis #1232) 2026-05-01 06:47:42 +01:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:34 +00:00
.woodpecker.yml ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-29 00:03:04 +01:00
AGENTS.md fix(go-forge): ax7 + Example* + docs stubs via generator (Mantis #1336) 2026-05-01 19:33:47 +01:00
CLAUDE.md docs(forge): align service docs with milestones 2026-04-02 06:08:46 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:34 +00:00
go.work chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:39:51 +01:00
LICENCE chore: add EUPL-1.2 LICENCE file (UK English canonical) 2026-05-01 08:34:02 +01:00
README.md refactor(module): migrate module path to dappco.re/go/core/forge 2026-03-22 01:51:29 +00:00
sonar-project.properties ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-28 23:33:20 +01:00

Go Reference License: EUPL-1.2 Go Version

go-forge

Go module: dappco.re/go/core/forge

License

EUPL-1.2