Documentation
¶
Overview ¶
ColoredCobra allows you to colorize Cobra's text output, making it look better using simple settings to customize individual parts of console output.
Usage example:
1. Insert in cmd/root.go file of your project :
import cc "github.com/ivanpirog/coloredcobra"
2. Put the following code to the beginning of the Execute() function:
cc.Init(&cc.Config{
RootCmd: rootCmd,
Headings: cc.Bold + cc.Underline,
Commands: cc.Yellow + cc.Bold,
ExecName: cc.Bold,
Flags: cc.Bold,
})
3. Build & execute your code.
Copyright © 2022 Ivan Pirog <ivan.pirog@gmail.com>. Released under the MIT license. Project home: https://github.com/ivanpirog/coloredcobra
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.