diff --git a/forge.go b/forge.go index 3c3a976..0f7eaf8 100644 --- a/forge.go +++ b/forge.go @@ -123,7 +123,7 @@ func (f *Forge) String() string { if f.client == nil { return "forge.Forge{client=}" } - return "forge.Forge{" + f.client.String() + "}" + return "forge.Forge{client=" + f.client.String() + "}" } // GoString returns a safe Go-syntax summary of the Forge client. diff --git a/forge_test.go b/forge_test.go index bec674d..8a47bf5 100644 --- a/forge_test.go +++ b/forge_test.go @@ -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) }