You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Expected call at /Users/poy/workspace/go/src/user/poy/chat-bots/registrar/registrar_test.go:25 doesn't match the argument at index 0.
Got: [123 34 116 101 120 116 34 58 34 86 101 114 115 105 111 110 58 32 48 46 48 46 49 34 125]
Want: is equal to map[text:0.0.1]
Proposal
Add a new interface GotFormatter that a custom matcher could implement. Before printing the failure's "Got" field, check to see if the matcher implements the new interface and use it to convert the value into a string.
type GotFormatter interface {
Format(actual interface{}) string
}
The text was updated successfully, but these errors were encountered:
Problem
When working with certain types (e.g.,
[]byte
) the output is not helpful:This is made worse when using a custom matcher.
Proposal
Add a new interface
GotFormatter
that a custom matcher could implement. Before printing the failure's "Got" field, check to see if the matcher implements the new interface and use it to convert the value into a string.The text was updated successfully, but these errors were encountered: