adds ipv6 index to config and a cli command to view network interface

This commit is contained in:
2021-06-25 22:06:07 +04:00
parent 680f703326
commit f4bd08b6bf
6 changed files with 53 additions and 2 deletions

View File

@@ -109,6 +109,15 @@ var CliAction = func(ctx *cli.Context) error {
}
}
//If the network interface flag is called
// Then all the network interfaces are displayed
if NetworkInterface {
err := p2p.ViewNetworkInterface()
if err != nil {
fmt.Print(err)
}
}
return nil
}

View File

@@ -19,6 +19,7 @@ var (
UpdateServerList bool
ServerList bool
SetDefaultConfig bool
NetworkInterface bool
)
var AppConfigFlags = []cli.Flag{
@@ -103,4 +104,10 @@ var AppConfigFlags = []cli.Flag{
EnvVars: []string{"SET_DEFAULT_CONFIG"},
Destination: &SetDefaultConfig,
},
&cli.BoolFlag{
Name: "NetworkInterfaces",
Usage: "Shows the network interface in your computer",
EnvVars: []string{"NETWORK_INTERFACE"},
Destination: &NetworkInterface,
},
}