test(go): 添加 errors.AsType、net 及手机号正则匹配测试

This commit is contained in:
张育新
2026-08-08 18:20:19 +08:00
parent a2dbd51f35
commit 722a5b13e0
3 changed files with 65 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package net
import (
"net"
"testing"
)
func TestNet(t *testing.T) {
s := net.JoinHostPort("127.0.0.1", "8080")
t.Log(s)
t.Log(s)
addrs, err := net.LookupAddr("198.18.0.18")
if err != nil {
t.Fatal(err)
}
t.Log(addrs)
}