More elegant management of ip allowlists

This commit is contained in:
9seconds
2022-03-21 12:04:31 +03:00
parent c0899d0743
commit a27facaa16
6 changed files with 92 additions and 32 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ func (m memFile) String() string {
return "mem"
}
func NewMem(networks []*net.IPNet) (File) {
func NewMem(networks []*net.IPNet) File {
builder := strings.Builder{}
if len(networks) > 0 {
@@ -32,6 +32,6 @@ func NewMem(networks []*net.IPNet) (File) {
}
return memFile{
data: builder.String(),
data: builder.String(),
}
}