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.
star/httpreverse/reverse_test.go

33 lines
509 B
Go

package httpreverse
import (
"fmt"
"net"
"testing"
)
func TestCIDR(t *testing.T) {
_, c, err := net.ParseCIDR("108.162.192.0/18")
if err != nil {
t.Fatal(err)
}
fmt.Println(c.Contains(net.ParseIP("108.162.245.124")))
}
func TestReverseParse(t *testing.T) {
data, err := Parse("./cfg.ini")
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", data)
}
func TestReverse(t *testing.T) {
data, err := Parse("./cfg.ini")
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", data)
data.Run()
}