An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/ttacon/chalk

Package chalk is a package for styling terminal/console output. There are three main components: There are eight default colors: black, red, green, yellow, blue, magenta, cyan and white. You can use them in two main ways (note the need for the reset color if you don't use Color()): There are seven default text styles: bold, dim, italic, underline, inverse, hidden and strikethrough. Unlike colors, you should only really use TextStyles in the following manner: Styles are where all the business really is. Styles can have a foreground color, a background color and a text style (sweet!). They're also pretty simply to make, you just need a starting point: When a color is your starting point for a style, it will be the foreground color, when a style is your starting point, well, yeah, it's your style's text style. You can also alter a style's foreground, background or text style in a builder-esque pattern. Like both Colors and TextStyles you can style specific segments of text with: Like Colors, you can also print styles explicitly, but you'll need to reset your console's colors with chalk.Reset if you use them this way: Be aware though, that this (second) way of using styles will not add the text style (as text styles require more specific end codes). So if you want to fully utilize styles, use myStyle.Style() (unless you only care about print your text with a specific foreground and background, then printing the style is awesome too!). Have fun!
1 version
Latest release: about 9 years ago
186 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/ttacon/chalk

Dependent Repos 0