mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
console/frontend: better error formatting
This commit is contained in:
13
common/helpers/strings.go
Normal file
13
common/helpers/strings.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package helpers
|
||||
|
||||
import "unicode"
|
||||
|
||||
// Capitalize turns the first letter of a string to its upper case version.
|
||||
func Capitalize(str string) string {
|
||||
if len(str) == 0 {
|
||||
return ""
|
||||
}
|
||||
r := []rune(str)
|
||||
r[0] = unicode.ToUpper(r[0])
|
||||
return string(r)
|
||||
}
|
||||
Reference in New Issue
Block a user