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 ifNO_COLOR
is set.
Breaking Changes:
progress
:
- The
Logger
interface has been updated to work withlog/slog
andlogutil
.Logger.WithFields
has been replaced withLogger.WithAttrs
and theFields
type is gone. TheDebug
/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 thespinner
package for how to achieve the same functionality.
spinner
:
Tracker
has been removed. InsteadNewTracker()
can be used to create aprogress.Tracker
with the given options. TheDisableSpinner
option can be used to achieve the same functionality thatprogress.PlainTracker
previously provided.