onsi / gomega

Ginkgo's Preferred Matcher Library
http://onsi.github.io/gomega/
MIT License
2.18k stars 284 forks source link

Document acceptable string-like types for string matchers #595

Open davidhsingyuchen opened 2 years ago

davidhsingyuchen commented 2 years ago

Summary

PR adds []byte and json.RawMessage as acceptable string types to function comments and error messages. They come from the implementation of toString.

Notes

I noticed that toString is also used in matchers other than the ones updated in this PR, but I feel it's a bit weird to mention json.RawMessage in other matchers like an YAML matcher, so I decided to only update string-related matchers in this PR.