소스 검색

fix(netclient): get only first part of the hostname

If the hostname is full, only take the first part of the name.
Adrien Raffin-Caboisse 4 년 전
부모
커밋
a5b7ca90fc
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      netclient/main.go

+ 2 - 0
netclient/main.go

@@ -10,6 +10,7 @@ import (
 	"os/signal"
 	"runtime/debug"
 	"strconv"
+	"strings"
 	"syscall"
 
 	"github.com/gravitl/netmaker/netclient/command"
@@ -30,6 +31,7 @@ func main() {
 	if err != nil {
 		hostname = ""
 	}
+	hostname = strings.Split(hostname, ".")[0]
 
 	cliFlags := []cli.Flag{
 		&cli.StringFlag{