*(querylog): added offset/limit parameters
Actually, this is a serious refactoring of the query log module. The rest API part is refactored, it's now more clear how the search is conducted. Split the logic into more files and added more tests. Closes: https://github.com/AdguardTeam/AdGuardHome/issues/1559
This commit is contained in:
@@ -10,6 +10,16 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ContainsString checks if "v" is in the array "arr"
|
||||
func ContainsString(arr []string, v string) bool {
|
||||
for _, i := range arr {
|
||||
if i == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// fileExists returns TRUE if file exists
|
||||
func FileExists(fn string) bool {
|
||||
_, err := os.Stat(fn)
|
||||
|
||||
Reference in New Issue
Block a user