From eb6185983fb4ba2124b6fe7a2c17e31bc0a61eab Mon Sep 17 00:00:00 2001 From: lauralani Date: Sun, 12 Mar 2023 13:21:49 +0100 Subject: [PATCH] remove command from ip and subnet command --- cmd/ip.go | 5 ----- cmd/subnet.go | 16 +++------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/cmd/ip.go b/cmd/ip.go index e9a397c..8df3e80 100644 --- a/cmd/ip.go +++ b/cmd/ip.go @@ -5,8 +5,6 @@ Copyright © 2023 Laura Kalb package cmd import ( - "fmt" - "github.com/spf13/cobra" ) @@ -16,9 +14,6 @@ var ipCmd = &cobra.Command{ Short: "manage ip addresses", Long: `Add, delete, edit and show IP addresses`, Aliases: []string{"i"}, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("ip called") - }, } func init() { diff --git a/cmd/subnet.go b/cmd/subnet.go index 7a95673..befd1f0 100644 --- a/cmd/subnet.go +++ b/cmd/subnet.go @@ -5,25 +5,15 @@ Copyright © 2023 Laura Kalb package cmd import ( - "fmt" - "github.com/spf13/cobra" ) // subnetCmd represents the subnet command var subnetCmd = &cobra.Command{ - Use: "subnet", - Short: "manage ip subnets", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, + Use: "subnet", + Short: "Manage ip subnets", + Long: `Manage ip subnets`, Aliases: []string{"s"}, - Run: func(cmd *cobra.Command, args []string) { - fmt.Println("subnet called") - }, } func init() {