Update vendor

This commit is contained in:
Ettore Di Giacinto
2020-11-23 19:14:07 +01:00
parent 7a10ff2742
commit 5b54aeb822
147 changed files with 28614 additions and 0 deletions

28
vendor/github.com/jedib0t/go-pretty/text/format.go generated vendored Normal file
View File

@@ -0,0 +1,28 @@
package text
import "strings"
// Format denotes the "case" to use for text.
type Format int
// Format enumerations
const (
FormatDefault Format = iota // default_Case
FormatLower // lower
FormatTitle // Title
FormatUpper // UPPER
)
// Apply converts the text as directed.
func (tc Format) Apply(text string) string {
switch tc {
case FormatLower:
return strings.ToLower(text)
case FormatTitle:
return strings.Title(text)
case FormatUpper:
return strings.ToUpper(text)
default:
return text
}
}