Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use custom UEvent.String() that produces human-unreadable representation #32

Open
anatol opened this issue Jul 30, 2022 · 0 comments

Comments

@anatol
Copy link

anatol commented Jul 30, 2022

The output of struct's String() suppose to be consumed as a formatted text primarily by a human. With something like this fmt.Printf("%+v", event).

Unfortunately current String() has a number of problems:

  • it uses non-standard struct representation that is inconsistent with the majority of the golang libraries/projects
  • it contacts the fields
  • %+v does not print fields names
  • Printf() does not print Env, probably because the current string prints NUL-symbol (it is a bad idea to use NUL-symbol).

Please remove the custom incorrect String() implementation and consider using the default implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant