2025-09-24 13:00:00 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
"code.oliverdavies.uk/opdavies/cmd-zet/internal/lib"
|
|
|
|
)
|
|
|
|
|
|
|
|
var findCmd = &cobra.Command{
|
|
|
|
Use: "find",
|
|
|
|
Aliases: []string{"f", "s", "search"},
|
|
|
|
Short: "A brief description of your command",
|
|
|
|
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.`,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if len(args) < 1 {
|
|
|
|
fmt.Println("No query")
|
|
|
|
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
|
2025-09-24 18:39:03 +01:00
|
|
|
zets := lib.SearchZets(args[0])
|
2025-09-24 13:00:00 +01:00
|
|
|
|
|
|
|
lib.ParseZetList(zets)
|
|
|
|
},
|
|
|
|
}
|