fix(forge): clarify top-level client summary
All checks were successful
Security Scan / security (push) Successful in 16s
Test / test (push) Successful in 1m55s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 08:26:07 +00:00
parent ddff64bc8e
commit 0e8bc8918e
2 changed files with 2 additions and 2 deletions

View file

@ -123,7 +123,7 @@ func (f *Forge) String() string {
if f.client == nil {
return "forge.Forge{client=<nil>}"
}
return "forge.Forge{" + f.client.String() + "}"
return "forge.Forge{client=" + f.client.String() + "}"
}
// GoString returns a safe Go-syntax summary of the Forge client.

View file

@ -85,7 +85,7 @@ func TestForge_HasToken_Bad(t *testing.T) {
func TestForge_String_Good(t *testing.T) {
f := NewForge("https://forge.lthn.ai", "tok", WithUserAgent("go-forge/1.0"))
got := fmt.Sprint(f)
want := `forge.Forge{forge.Client{baseURL="https://forge.lthn.ai", token=set, userAgent="go-forge/1.0"}}`
want := `forge.Forge{client=forge.Client{baseURL="https://forge.lthn.ai", token=set, userAgent="go-forge/1.0"}}`
if got != want {
t.Fatalf("got %q, want %q", got, want)
}