13 Star 100 Fork 25

RACHEL/fastsearch

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
utils.go 429 Bytes
一键复制 编辑 原始数据 按行查看 历史
hkingsoftcn 提交于 2024-08-26 13:30 +08:00 . fastsearch
package system
import (
"fmt"
"strconv"
)
func GetFloat64MB(size int64) float64 {
val, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", float64(size)/1024/1024), 64)
return val
}
func GetUint64GB(size uint64) float64 {
val, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", float64(size)/1024/1024/1024), 64)
return val
}
func GetPercent(val float64) float64 {
v, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", val), 64)
return v
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rachel_os/fastsearch.git
git@gitee.com:rachel_os/fastsearch.git
rachel_os
fastsearch
fastsearch
98a29f8d6bf9

搜索帮助