mirror of
https://github.com/cheat/cheat.git
synced 2024-12-25 14:09:44 +01:00
85f5ae8ec7
Make various lint corrections in order to appease `staticcheck`.
19 lines
353 B
Go
19 lines
353 B
Go
package display
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/cheat/cheat/internal/config"
|
|
)
|
|
|
|
// Faint returns an faint string
|
|
func Faint(str string, conf config.Config) string {
|
|
// make `str` faint only if colorization has been requested
|
|
if conf.Colorize {
|
|
return fmt.Sprintf("\033[2m%s\033[0m", str)
|
|
}
|
|
|
|
// otherwise, return the string unmodified
|
|
return str
|
|
}
|