add subscription pattern to acls,fix NaN value in metrics for uptime,get real iface name for mac

This commit is contained in:
Abhishek Kondur
2022-09-30 18:31:57 +05:30
parent 7783af3e58
commit 0df6d1761e
13 changed files with 125 additions and 46 deletions

View File

@@ -218,3 +218,11 @@ func StringDifference(a, b []string) []string {
}
return diff
}
// CheckIfFileExists - checks if file exists or no in the given path
func CheckIfFileExists(filePath string) bool {
if _, err := os.Stat(filePath); os.IsNotExist(err) {
return false
}
return true
}