mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-13 17:22:27 +08:00
refactor: rename package 'utils' to 'internal'
This commit is contained in:
@@ -5,14 +5,14 @@ import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/duke-git/lancet/utils"
|
||||
"github.com/duke-git/lancet/internal"
|
||||
)
|
||||
|
||||
func TestGetInternalIp(t *testing.T) {
|
||||
internalIp := GetInternalIp()
|
||||
ip := net.ParseIP(internalIp)
|
||||
if ip == nil {
|
||||
utils.LogFailedTestInfo(t, "GetInternalIp", "GetInternalIp", "", ip)
|
||||
internal.LogFailedTestInfo(t, "GetInternalIp", "GetInternalIp", "", ip)
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ func TestIsPublicIP(t *testing.T) {
|
||||
res := IsPublicIP(ips[i])
|
||||
|
||||
if res != expected[i] {
|
||||
utils.LogFailedTestInfo(t, "IsPublicIP", ips[i], expected[i], res)
|
||||
internal.LogFailedTestInfo(t, "IsPublicIP", ips[i], expected[i], res)
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/duke-git/lancet/utils"
|
||||
"github.com/duke-git/lancet/internal"
|
||||
)
|
||||
|
||||
func TestHttpGet(t *testing.T) {
|
||||
@@ -112,7 +112,7 @@ func TestConvertMapToQueryString(t *testing.T) {
|
||||
expected := "a=1&b=2&c=3"
|
||||
r := ConvertMapToQueryString(m)
|
||||
if r != expected {
|
||||
utils.LogFailedTestInfo(t, "ConvertMapToQueryString", m, expected, r)
|
||||
internal.LogFailedTestInfo(t, "ConvertMapToQueryString", m, expected, r)
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user