You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
359 B
25 lines
359 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
/*
|
|
*
|
|
@author: sre
|
|
@date: 2022/8/14 0014
|
|
@desc: todo
|
|
*
|
|
*/
|
|
func TestPorts(tt *testing.T) {
|
|
url := "http://134.53.225.196"
|
|
ipPort := strings.Split(url, "//")[1]
|
|
ip := strings.Split(ipPort, ":")[0]
|
|
//port := strings.Split(ipPort, ":")[1]
|
|
fmt.Println(ip)
|
|
fmt.Println(len(strings.Split(ipPort, ":")))
|
|
|
|
}
|