github google/yamlfmt v0.20.0

20 hours ago

Features

-version flag works when using go install

The previous method of version retrieval only worked when downloading the binary through GitHub releases or one of the community-made packages. When using go install, the version would always be dev because the ldflags weren't being used to set the version. It now falls back to debug.BuildInfo so that the version will be displayed properly when installing through this method.

Fixes

Performance Issues when formatting large files

Details in #283. Two fixes were submitted:

  • Use of strings.Repeat instead of manually looping during string construction #284
  • Changing logic to only construct a diff string when the debug code is active #287

If you have experienced similar performance issues, these fixes should help.

Contributors

Thanks @artur-beznosyuk-verkada for the performance issue analysis and the strings.Repeat fix.

Don't miss a new yamlfmt release

NewReleases is sending notifications on new releases.