Skip to content

v0.5.0

Latest
Compare
Choose a tag to compare
@jbinto jbinto released this 29 Sep 23:06
167f7ad

New packages:

logutil: The new logutil package provides utilities that extend the functionality of the log/slog package.

Minor Changes:

color:

  • Added the Colorer type which can be used to disable colours in a local context without affecting the global functions.
  • Added IsNoColorEnvSet() to see if NO_COLOR is set.

Breaking Changes:

progress:

  • The Logger interface has been updated to work with log/slog and logutil. Logger.WithFields has been replaced with Logger.WithAttrs and the Fields type is gone. The Debug/Info/Warn/Error methods require the message as the first argument, subsequent arguments are expected to be attributes that will be added to the log.
  • PlainTracker has been removed. See the changes to the spinner package for how to achieve the same functionality.

spinner:

  • Tracker has been removed. Instead NewTracker() can be used to create a progress.Tracker with the given options. The DisableSpinner option can be used to achieve the same functionality that progress.PlainTracker previously provided.