mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
fix: update params in TestIsPingConnected
This commit is contained in:
@@ -180,7 +180,7 @@ func ExampleConvertMapToQueryString() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExampleIsPingConnected() {
|
func ExampleIsPingConnected() {
|
||||||
result1 := IsPingConnected("www.baidu.com")
|
result1 := IsPingConnected("cn.bing.com")
|
||||||
result2 := IsPingConnected("www.!@#&&&.com")
|
result2 := IsPingConnected("www.!@#&&&.com")
|
||||||
|
|
||||||
fmt.Println(result1)
|
fmt.Println(result1)
|
||||||
@@ -192,7 +192,7 @@ func ExampleIsPingConnected() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExampleIsTelnetConnected() {
|
func ExampleIsTelnetConnected() {
|
||||||
result1 := IsTelnetConnected("www.baidu.com", "80")
|
result1 := IsTelnetConnected("cn.bing.com", "80")
|
||||||
result2 := IsTelnetConnected("www.baidu.com", "123")
|
result2 := IsTelnetConnected("www.baidu.com", "123")
|
||||||
|
|
||||||
fmt.Println(result1)
|
fmt.Println(result1)
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ func TestEncodeUrl(t *testing.T) {
|
|||||||
func TestIsPingConnected(t *testing.T) {
|
func TestIsPingConnected(t *testing.T) {
|
||||||
assert := internal.NewAssert(t, "TestIsPingConnected")
|
assert := internal.NewAssert(t, "TestIsPingConnected")
|
||||||
|
|
||||||
result1 := IsPingConnected("www.baidu.com")
|
result1 := IsPingConnected("cn.bing.com")
|
||||||
assert.Equal(true, result1)
|
assert.Equal(true, result1)
|
||||||
|
|
||||||
result2 := IsPingConnected("www.!@#&&&.com")
|
result2 := IsPingConnected("www.!@#&&&.com")
|
||||||
@@ -130,7 +130,7 @@ func TestIsPingConnected(t *testing.T) {
|
|||||||
func TestTelnetConnected(t *testing.T) {
|
func TestTelnetConnected(t *testing.T) {
|
||||||
assert := internal.NewAssert(t, "TestTelnetConnected")
|
assert := internal.NewAssert(t, "TestTelnetConnected")
|
||||||
|
|
||||||
result1 := IsTelnetConnected("www.baidu.com", "80")
|
result1 := IsTelnetConnected("cn.bing.com", "80")
|
||||||
assert.Equal(true, result1)
|
assert.Equal(true, result1)
|
||||||
|
|
||||||
result2 := IsTelnetConnected("www.baidu.com", "123")
|
result2 := IsTelnetConnected("www.baidu.com", "123")
|
||||||
|
|||||||
Reference in New Issue
Block a user