You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
297 B
Go
17 lines
297 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestCfg(t *testing.T) {
|
|
c, err := parseCfg("config.json")
|
|
if err != nil {
|
|
t.Fatalf("%s\n", err)
|
|
}
|
|
fmt.Printf("%+v\n", c)
|
|
fmt.Printf("%v\n", c.Rules[0].domains.match("google.com"))
|
|
fmt.Printf("%v\n", c.Rules[0].domains.match("www.ip.cn"))
|
|
}
|