mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-09 21:36:09 +08:00
fix(netclient): get only first part of the hostname
If the hostname is full, only take the first part of the name.
This commit is contained in:
parent
15f9a0186f
commit
a5b7ca90fc
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/gravitl/netmaker/netclient/command"
|
"github.com/gravitl/netmaker/netclient/command"
|
||||||
|
@ -30,6 +31,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
hostname = ""
|
hostname = ""
|
||||||
}
|
}
|
||||||
|
hostname = strings.Split(hostname, ".")[0]
|
||||||
|
|
||||||
cliFlags := []cli.Flag{
|
cliFlags := []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
|
|
Loading…
Add table
Reference in a new issue