MCPcopy
hub / github.com/cortexlabs/cortex / BoldFirstLine

Function BoldFirstLine

pkg/lib/print/print.go:29–42  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

27var _maxBoldLength = 200
28
29func BoldFirstLine(msg string) {
30 msgParts := strings.Split(msg, "\n")
31
32 if len(msgParts[0]) > _maxBoldLength {
33 fmt.Println(msg)
34 return
35 }
36
37 fmt.Println(console.Bold(msgParts[0]))
38
39 if len(msgParts) > 1 {
40 fmt.Println(strings.Join(msgParts[1:], "\n"))
41 }
42}
43
44func StderrBoldFirstLine(msg string) {
45 msgParts := strings.Split(msg, "\n")

Callers 4

env.goFile · 0.92
configureEnvFunction · 0.92
refresh.goFile · 0.92
delete.goFile · 0.92

Calls 1

BoldFunction · 0.92

Tested by

no test coverage detected