mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-03 04:07:51 +08:00
16 lines
659 B
Go
16 lines
659 B
Go
package validation
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestSplitEndpointAddress(t *testing.T) {
|
|
address := SplitEndpointAddress("http://www.baidu.com")
|
|
fmt.Printf("endpoint: %s, addrss: %s, is IP? %t \n", "http://www.baidu.com", address, len(ValidateEndpointIP(address)) == 0)
|
|
address = SplitEndpointAddress("http://www.baidu.com:443")
|
|
fmt.Printf("endpoint: %s, addrss: %s, is IP? %t \n", "http://www.baidu.com:443", address, len(ValidateEndpointIP(address)) == 0)
|
|
address = SplitEndpointAddress("http://10.211.55.3:7070")
|
|
fmt.Printf("endpoint: %s, addrss: %s, is IP? %t \n", "http://10.211.55.3:7070", address, len(ValidateEndpointIP(address)) == 0)
|
|
}
|