wip: a list command

This commit is contained in:
2026-05-12 20:39:19 -06:00
parent 928a6024ad
commit a7eaa45869
+13 -1
View File
@@ -19,6 +19,18 @@ var rootCmd = &cobra.Command{
},
}
var listCmd = &cobra.Command{
Use: "list [directory]",
Short: "List the contents of a directory",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
name := "world"
fmt.Printf("Hello, %s!\n", name)
return nil
},
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
@@ -27,5 +39,5 @@ func Execute() {
}
func init() {
//
rootCmd.AddCommand(listCmd)
}