Commit d219f7c

Karn Wong <karn@karnwong.me>
2024-07-26 07:22:15
get: move Cmd to root
1 parent cc2ab84
cmd/get/get.go
@@ -14,3 +14,8 @@ var Cmd = &cobra.Command{
 		fmt.Println("Please specify subcommand")
 	},
 }
+
+func init() {
+	Cmd.AddCommand(getIPCmd)
+	Cmd.AddCommand(getSystemInfoCmd)
+}
cmd/get/get_ip.go
@@ -81,7 +81,3 @@ var getIPCmd = &cobra.Command{
 		}
 	},
 }
-
-func init() {
-	Cmd.AddCommand(getIPCmd)
-}
cmd/get/get_system_info.go
@@ -131,7 +131,3 @@ var getSystemInfoCmd = &cobra.Command{
 		fmt.Println(systemInfoStr)
 	},
 }
-
-func init() {
-	Cmd.AddCommand(getSystemInfoCmd)
-}