fix(forge): clarify top-level client summary
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
ddff64bc8e
commit
0e8bc8918e
2 changed files with 2 additions and 2 deletions
2
forge.go
2
forge.go
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue