mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
改进剩余流量显示
改为后端运行。
This commit is contained in:
1 parent
d09c62fcb0
commit
b4c295c531
3 files changed
+13
-26
No files matched your search
@@ -148,6 +148,14 @@ var funcMap = template.FuncMap{
|
||||
"add": func(a, b int) int {
|
||||
return a + b
|
||||
},
|
||||
"Transleft": func(a, b float64) (n float64) {
|
||||
n, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", (100-(a/b)*100)), 64)
|
||||
return
|
||||
},
|
||||
"UintToFloat": func(a uint64) (n float64) {
|
||||
n, _ = strconv.ParseFloat((strconv.FormatUint(a, 10)), 64)
|
||||
return
|
||||
},
|
||||
"dayBefore": func(i int) string {
|
||||
year, month, day := time.Now().Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
|
||||
Reference in new issue
Block a user