feat: nameserver-policy support domain-set, reduce domain-set memory usage

This commit is contained in:
Skyxim
2023-03-29 13:14:02 +08:00
parent 56e525114d
commit d52748165f
8 changed files with 256 additions and 35 deletions

8
common/utils/strings.go Normal file
View File

@ -0,0 +1,8 @@
package utils
func Reverse(s string) string {
a := []rune(s)
for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
a[i], a[j] = a[j], a[i]
}
return string(a)
}