dive/utils/format.go

23 lines
364 B
Go
Raw Normal View History

2019-09-21 22:28:45 +02:00
package utils
import (
2019-10-02 21:48:10 +02:00
"strings"
"github.com/logrusorgru/aurora"
2019-09-21 22:28:45 +02:00
)
func TitleFormat(s string) string {
return aurora.Bold(s).String()
}
2019-10-02 21:48:10 +02:00
// CleanArgs trims the whitespace from the given set of strings.
func CleanArgs(s []string) []string {
var r []string
for _, str := range s {
if str != "" {
r = append(r, strings.Trim(str, " "))
}
}
return r
}