Go SDK - Add String() method to exported structs for better logging #1401
wilbred-anto
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background:
While working with the Looker SDK for Go, I noticed that there is no
String()
method implemented for the exported structs.Currently, the absence of a
String()
method makes it challenging when it comes to logging or debugging, especially considering that many structs contain pointer variables.Having a
String()
method would greatly enhance the developer experience by providing a human-readable string representation of the struct. This would be particularly useful for logging and debugging purposes, making it easier to understand the content of structs when working with the SDK.I understand that the SDK is designed to work with auto-generated code based on Looker API specifications, and I believe that having
String()
methods for the exported structs could be a valuable addition without compromising the core functionality.Beta Was this translation helpful? Give feedback.
All reactions