mirror of
https://github.com/1Panel-dev/KubePi.git
synced 2025-10-05 15:26:58 +08:00
20 lines
283 B
Go
20 lines
283 B
Go
package lang
|
|
|
|
import (
|
|
"strconv"
|
|
"strings"
|
|
)
|
|
|
|
func FirstToUpper(str string) string {
|
|
b := strings.ToUpper(str[:1]) + str[1:]
|
|
return b
|
|
}
|
|
|
|
func ParseValueType(str string) interface{} {
|
|
b, err := strconv.ParseBool(strings.ToLower(str))
|
|
if err != nil {
|
|
return str
|
|
}
|
|
return b
|
|
}
|