chore: reformat code

This commit is contained in:
世界
2022-06-09 21:08:46 +08:00
parent 9a55213ddc
commit cd466f05d3
114 changed files with 159 additions and 185 deletions

View File

@ -2,9 +2,7 @@ package trie
import "errors"
var (
ErrorOverMaxValue = errors.New("the value don't over max value")
)
var ErrorOverMaxValue = errors.New("the value don't over max value")
type IpCidrNode struct {
Mark bool

View File

@ -1,8 +1,9 @@
package trie
import (
"github.com/Dreamacro/clash/log"
"net"
"github.com/Dreamacro/clash/log"
)
type IPV6 bool

View File

@ -49,7 +49,6 @@ func TestIpv4Search(t *testing.T) {
assert.Equal(t, false, trie.IsContain(net.ParseIP("22")))
assert.Equal(t, false, trie.IsContain(net.ParseIP("")))
}
func TestIpv6AddSuccess(t *testing.T) {
@ -96,5 +95,4 @@ func TestIpv6Search(t *testing.T) {
assert.Equal(t, true, trie.IsContainForString("2001:67c:4e8:9666::1213"))
assert.Equal(t, false, trie.IsContain(net.ParseIP("22233:22")))
}