Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nib API v0 #5

Merged
merged 1 commit into from
Sep 21, 2020
Merged

nib API v0 #5

merged 1 commit into from
Sep 21, 2020

Conversation

svengreb
Copy link
Owner

Resolves #2

Implemented the API v0 with the following interfaces and types:

- [I] `Nib` — a log-level based line printer for human-facing messages.
- [T] `Verbosity` — defines the verbosity level of the line printer.

GH-2
@svengreb svengreb added this to the 0.1.0 milestone Sep 21, 2020
@svengreb svengreb self-assigned this Sep 21, 2020
@svengreb svengreb merged commit 4003909 into main Sep 21, 2020
@svengreb svengreb deleted the feature/gh-2-nib-api-v0 branch September 21, 2020 19:43
@svengreb svengreb removed their assignment Sep 21, 2020
svengreb added a commit that referenced this pull request Sep 22, 2020
Implemented the new package `inkpen` that implements the `nib.Nib` API
v0 (designed in #5 [1]) 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 [2]. The default writer is color.Output [3] of the
github.com/fatih/color [4] that is used and provides automatic TTY and
terminal color support detection.

The following verbosity levels [5] is implemented with default icons:

- ⦿ `debug`
- ✕ `error`
- ⭍ `fatal`
- ➜ `info`
- ✓ `success`
- ! `warning`

[1]: https://github.com/svengreb/nib/pull/
[2]: https://golang.org/pkg/io/#Writer
[3]: https://github.com/fatih/color/blob/fccafd9e876be44d0d7b380a3b03aeb661c1e231/color.go#L25
[4]: https://github.com/fatih/color
[5]: https://github.com/svengreb/nib/blob/400390915ca497add7c43aa1ff232a08c8501081/verbosity.go

GH-6
svengreb added a commit that referenced this pull request Sep 22, 2020
Implemented the new package `inkpen` that implements the `nib.Nib` API
v0 (designed in #5 [1]) 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 [2]. The default writer is color.Output [3] of the
github.com/fatih/color [4] that is used and provides automatic TTY and
terminal color support detection.

The following verbosity levels [5] is implemented with default icons:

- ⦿ `debug`
- ✕ `error`
- ⭍ `fatal`
- ➜ `info`
- ✓ `success`
- ! `warning`

[1]: https://github.com/svengreb/nib/pull/
[2]: https://golang.org/pkg/io/#Writer
[3]: https://github.com/fatih/color/blob/fccafd9e876be44d0d7b380a3b03aeb661c1e231/color.go#L25
[4]: https://github.com/fatih/color
[5]: https://github.com/svengreb/nib/blob/400390915ca497add7c43aa1ff232a08c8501081/verbosity.go

Resolves GH-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nib API v0
1 participant