-
Notifications
You must be signed in to change notification settings - Fork 264
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
Fixedwidth during stream of CF events #204
base: master
Are you sure you want to change the base?
Conversation
// Format reads the struct tag `width:"<width>,<space>"` | ||
// further marshaling into structured field | ||
func (s *stackEvent) format(fil filters) []byte { | ||
tp := reflect.TypeOf(s).Elem() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be possible to add table unit tests for that method which seems central? It would help the understanding, document a bit the look of the output, put non regression in place and allow future safe refactoring.
I do not have the answer, I am just wondering.
Tailers are experimental and are not advertised on the sub commands listing, so we have more leeway in their implementation. So we shall review that and it could make it into the 0.1.10 that is due in the next 2 days. Otherwise thanks for the work @trane9991 ! |
This PR adds the custom solution for streaming CloudFormation events into a structured table with a column of fixed width, to prevent "jumping"
Before:
After:
The new approach uses Reflection and pretty complex but seems to work well.