isNet before merge
parent
dc26216e44
commit
6291fa1257
|
@ -9,8 +9,10 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
//BSD 3
|
||||
|
@ -211,6 +213,17 @@ func d4checkConfig(d4 *d4S) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func isNet(d []byte) (bool, []string) {
|
||||
ss := strings.Split(string(d), ":")
|
||||
if len(ss) != 1 {
|
||||
if net.ParseIP(ss[0]) != nil {
|
||||
infof(fmt.Sprintf("Server IP: %s, Server Port: %s\n", ss[0], ss[1]))
|
||||
return true, make([]string, 0)
|
||||
}
|
||||
}
|
||||
return false, ss
|
||||
}
|
||||
|
||||
func generateUUIDv4() []byte {
|
||||
uuid, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue