🔖 dashboard v0.13.0 Globalization

This commit is contained in:
naiba
2022-04-30 00:48:39 +08:00
parent fe51b1afdc
commit ade06839b7
11 changed files with 52 additions and 13 deletions

View File

@@ -68,3 +68,14 @@ func IPDesensitize(ipAddr string) string {
ipAddr = ipv6Desensitize(ipAddr)
return ipAddr
}
func PathExists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
return true, nil
}
if os.IsNotExist(err) {
return false, nil
}
return false, err
}