MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / colorize

Method colorize

cmd/crowdsec-cli/main.go:188–204  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

186}
187
188func (*cliRoot) colorize(cmd *cobra.Command) {
189 cc.Init(&cc.Config{
190 RootCmd: cmd,
191 Headings: cc.Yellow,
192 Commands: cc.Green + cc.Bold,
193 CmdShortDescr: cc.Cyan,
194 Example: cc.Italic,
195 ExecName: cc.Bold,
196 Aliases: cc.Bold + cc.Italic,
197 FlagsDataType: cc.White,
198 Flags: cc.Green,
199 FlagsDescr: cc.Cyan,
200 NoExtraNewlines: true,
201 NoBottomNewline: true,
202 })
203 cmd.SetOut(color.Output)
204}
205
206func (cli *cliRoot) NewCommand() (*cobra.Command, error) {
207 // set the formatter asap and worry about level later

Callers 1

NewCommandMethod · 0.95

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected