doitintl / kube-no-trouble

Easily check your clusters for use of deprecated APIs
MIT License
3.21k stars 157 forks source link

ref: Add OutputFormat type to enforce flag validation at parse time #659

Closed harry97uk closed 1 week ago

harry97uk commented 2 weeks ago

I have added an OutputFormat type in a separate file within the config pkg. I have also added a couple of new unit tests to validate that the type is working as intended.

I set the default for the printer type as TEXT and removed code that did the printer type validation in config.go

I did not change anything in the printer pkg as I wanted to keep this PR small.

dark0dave commented 2 weeks ago

Well written and thank you for following the style of the repo!

dark0dave commented 2 weeks ago

Looks like the pre-commit failed you may have to run:

go fmt ./...

If you can clean these up will get this merged.

Thank you again.

harry97uk commented 1 week ago

Yes I will take a look later on tonight or tomorrow, thanks for the heads up