【修改】k8s 配置

This commit is contained in:
PandaGoAdmin
2022-01-22 17:07:04 +08:00
parent c6ebe89865
commit 33cc74711d
439 changed files with 9936 additions and 21687 deletions

View File

@@ -0,0 +1,26 @@
package utils
import (
"fmt"
"strconv"
)
func ParseFloat2F(value float64) float64 {
newValue, err := strconv.ParseFloat(fmt.Sprintf("%.2f", value), 64)
if err != nil {
fmt.Println("保留2位小数, 转换float出错")
return value
}
return newValue
}
func ParseStringToInt64(value string) int64 {
newValue, err := strconv.ParseInt(value, 10, 64)
if err != nil {
fmt.Println("string转换int64出错")
return 0
}
return newValue
}