Kunde21 / markdownfmt

Like gofmt, but for Markdown.
MIT License
55 stars 7 forks source link

main: Don't store flags globally #57

Closed abhinav closed 1 year ago

abhinav commented 1 year ago

This is in the same spirit as #55. It turns all flags currently stored as global variables into fields on mainCmd. By turning these into fields, this also takes advantage of *Var variants of flag methods that take a pointer as an argument instead of returning one.

As with #55, this makes the logic more testable and adds tests for some of the core logic.

This change contains no behavioral changes.