Files
Cosmos-Server/test.go
Yann Stepienik f461c3db0d [release] v0.17.4
2024-12-18 14:42:03 +00:00

23 lines
345 B
Go

package main
import (
"fmt"
"strings"
)
func main() {
target := ":80";
destinationArr := strings.Split(target, "://")
listenProtocol := "tcp"
if len(destinationArr) > 1 {
target = destinationArr[1]
listenProtocol = destinationArr[0]
} else {
target = destinationArr[0]
}
fmt.Println(listenProtocol)
fmt.Println(target)
}