mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-04 11:19:56 -06:00
23 lines
345 B
Go
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)
|
|
} |