1
0
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:
dudaodong
2021-12-31 11:36:11 +08:00
parent e15ae9eb98
commit c625a88067
15 changed files with 142 additions and 142 deletions

View File

@@ -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()
}
}

View File

@@ -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()
}
}