Move each command function from main.go into its own file (deploy.go, lifecycle.go, status.go, etc.) to enable parallel development by multiple workers without file conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
44 lines
831 B
Go
44 lines
831 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func nodeCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "node",
|
|
Short: "Node management",
|
|
}
|
|
|
|
list := &cobra.Command{
|
|
Use: "list",
|
|
Short: "List registered nodes",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return fmt.Errorf("not implemented")
|
|
},
|
|
}
|
|
|
|
add := &cobra.Command{
|
|
Use: "add <name> <address>",
|
|
Short: "Register a node",
|
|
Args: cobra.ExactArgs(2),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return fmt.Errorf("not implemented")
|
|
},
|
|
}
|
|
|
|
remove := &cobra.Command{
|
|
Use: "remove <name>",
|
|
Short: "Deregister a node",
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return fmt.Errorf("not implemented")
|
|
},
|
|
}
|
|
|
|
cmd.AddCommand(list, add, remove)
|
|
return cmd
|
|
}
|