mirror of
https://github.com/cheat/cheat.git
synced 2025-09-06 03:52:55 +02:00
chore: various lint corrections
Make various lint corrections in order to appease `staticcheck`.
This commit is contained in:

committed by
Chris Lane

parent
484b447391
commit
85f5ae8ec7
@ -10,7 +10,7 @@ import (
|
||||
func Faint(str string, conf config.Config) string {
|
||||
// make `str` faint only if colorization has been requested
|
||||
if conf.Colorize {
|
||||
return fmt.Sprintf(fmt.Sprintf("\033[2m%s\033[0m", str))
|
||||
return fmt.Sprintf("\033[2m%s\033[0m", str)
|
||||
}
|
||||
|
||||
// otherwise, return the string unmodified
|
||||
|
@ -4,5 +4,5 @@ import "fmt"
|
||||
|
||||
// Underline returns an underlined string
|
||||
func Underline(str string) string {
|
||||
return fmt.Sprintf(fmt.Sprintf("\033[4m%s\033[0m", str))
|
||||
return fmt.Sprintf("\033[4m%s\033[0m", str)
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ func Write(out string, conf config.Config) {
|
||||
// handle errors
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to write to pager: %v", err))
|
||||
fmt.Fprintf(os.Stderr, "failed to write to pager: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user