Skip to content

Conversation

@taraspos
Copy link
Contributor

@taraspos taraspos commented Apr 9, 2018

This PR adds the custom solution for streaming CloudFormation events into a structured table with a column of fixed width, to prevent "jumping"

Before:
before

After:
after

The new approach uses Reflection and pretty complex but seems to work well.

// 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()
Copy link
Contributor

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.

@simcap
Copy link
Contributor

simcap commented Apr 9, 2018

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 !

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

Successfully merging this pull request may close these issues.

2 participants