Changelog of the “stylish“, log-level based line printer for human-facing Go CLI applications.
Extend nib API to allow reuse of underlying writer — #21 ⇄ #22 (⊶ 2dac3395)
↠ To allow to reuse the underlying io.Writer the new Writer() io.Writer
method has been added to the nib.Nib
interface.
Both implementations the pencil
and inkpen
package have been adapted to this change.
Update to tmpl-go
template repository version 0.5.0 — #25 ⇄ #26 (⊶ 15285fb1)
↠ Updated to tmpl-go
version 0.5.0 (including version 0.4.0) that…
- …introduces the initial project documentation.
- …updates golangci-lint to the currently latest version 1.32.0 which introduces new linters like errorlint., tparallel. and wrapcheck.
- …updates to
tmpl
version 0.7.0 (#25 #34). This includes…- …a new configuration file for automated dependency updates and security alerts with Dependabot. Next to update configurations for the CI/CD GitHub action workflow and Yarn/NPM dependencies, the file has been extended to support Go modules.
- …updates to the latest Node.js package dependency & GitHub Action versions.
- …a change of the NPM package name to use a namespace which helps to prevent collisions with already existing NPM packages like tmpl.
Removed pencil.NewFrom(*pencil.Options)
function — #23 ⇄ #24 (⊶ 175478ec)
↠ The pencil.NewFrom(*pencil.Options)
function was not necessary because…
- …there is currently no way to get the actual options from a
pencil
instance. - …new
pencil
instances with different options can be simply composed by using the variadic parameter of thepencil.New(pencil.Option...)
function.
Therefore the pencil.NewFrom(*pencil.Options)
has been removed to simply the package surface.
Updated to latest Go module dependency versions — #28
↠ Bumped outdated Go module dependencies to their latest versions:
- #28 (⊶ 76653193)
github.com/fatih/color
] from 1.9.0 to 1.10.0 — upgrades thegithub.com/mattn/go-colorable
andgithub.com/mattn/go-isatty
dependencies which include various bug fixes and improvements.
This is the initial release version of nib. The basic project setup, structure and development workflow has been bootstrapped by the tmpl-go template repository.
Bootstrap based on "tmpl-go" template repository — #1 (⊶ 966454c6)
↠ Bootstrapped the basic project setup, structure and development workflow from version 0.1.0 of the "tmpl-go" template repository. Additionally specific assets like the repository hero image have been replaced and documentations like the README and GitHub issue/PR templates are adjusted.
nib API v0
— #2 ⇄ #5 (⊶ 40039091)
↠ Implemented the API v0
with the following interfaces and types:
- Ⓘ
Nib
— a log-level based line printer for human-facing messages. - Ⓣ
Verbosity
— defines the verbosity level of the line printer.
nib.Nib implementation inkpen
with color and icon prefix support — #6 ⇄ #7 (⊶ f5cb3546)
↠ Implemented a new package inkpen
that implements the nib.Nib
API v0
(designed in #5) with color support, custom prefixes and verbosity level icons for human-facing CLI messages.
The default IO output stream is configurable by accepting a io.Writer. The default writer is color.Output of the github.com/fatih/color which provides automatic TTY and terminal color support detection.
The following verbosity levels have been implemented with default icons:
- ⦿
debug
- ✕
error
- ⭍
fatal
- ➜
info
- ✓
success
- !
warning
Repository and package documentations — #8 ⇄ #9 (⊶ 191456ea)
↠ Wrote the repository and package documentation which includes information and guides about provided features, the currently latest API v0
, general usage instructions as well as detailed information about configurations like the verbosity, customizable icons and prefixes.
Splitted icon and prefix features into new pencil
package — #18 ⇄ #19 (⊶ 4f97c4c6)
↠ Before the inkpen
package provided a writer that was able to print verbosity level icons and prefixes with colors. To allow to use icons and prefixes without colors both features have been moved into a new pencil
package with a new pencil.Pencil
type. The inkpen.Inkpen
type has been changed to compose this new type and additionally allows to color the output.
In order to make it easier to configure both types, new package specific options has been implemented that are available via variadic parameters to the constructor functions of these types. This reduces the required code to configure a writer and also provides a safer usage with Goroutines.
Optimized OS and Go version matrix strategy for CI workflow — #12 ⇄ #13 (⊶ 2fca9af2)
↠ Before the CI workflow used a matrix strategy to run the lint-node
, lint-go
and test
jobs, but this also included steps that were not necessary for this repository. This has been improved to make the workflow run faster by avoiding unnecessary steps:
- The
lint-node
job has been changed to only run on the currently latest stable Node version14.x
only on Linux because this repository is not focused on JavaScript but only runs Node based tools to lint other files within this repository. - The
lint-go
job has been changed to only run on the currently latest stable Go version1.15.x
only on Linux becausegolangci-lint
doesn't care about the Go version and OS it runs on but only statically checks the source code. - The
test
job has been changed to only run on the currently latest stable Go version1.15.x
and only Linux and Windows while macOS is not necessary for this repository because there is no macOS specific code.
These changes also help to keep the required GitHub Action run minutes for the account of this repository as small as possible without wasting resources for unnecessary tasks.
Properly merge configured inkpen icon map — #16 ⇄ #17 (⊶ 17c8d6d3)
↠ Before the inkpen.SetIcons(map[nib.Verbosity]Icon)
method has overridden a nib.Verbosity
entry instead of merging the ColorFunc
and Value
fields causing unexpected behavior like uncolored output or missing icons. This has been changed to check for the zero value of the fields and merge them with the already configured struct.
Adapted to "tmpl-go" repository template version 0.1.1 — #3 ⇄ #4 (⊶ 0998f7e4)
↠ Adapted to "tmpl-go" version 0.1.1 which includes an important bug fix regarding the golangci-lint YAML configuration for the go-header linter that caused golangci-lint to fail.
Adapted to "tmpl-go" template repository version 0.2.0 — #10 ⇄ #11 (⊶ d9268f0c)
↠ Adapted to "tmpl-go" version 0.2.0 which includes a basic setup for testing in the CI workflow using Go's official go test
command with enabled coverage and race detector.
Adapted to "tmpl-go" template repository version 0.3.0 — #14 ⇄ #15 (⊶ 7ddcd614)
↠ Adapted to "tmpl-go" version 0.3.0 which includes a optimized run configuration for the CI workflow that helps to improve the performance through more fine grained configurations:
- Only runs on pushes to the
main
branch. - Only runs on pushes for
v*
tags. - Always runs for pushes to PRs.