Add titles
command to show all IDs and titles
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
12a0353a4c
commit
9019f4579d
10 changed files with 150 additions and 246 deletions
26
cmd/titles.go
Normal file
26
cmd/titles.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"code.oliverdavies.uk/opdavies/cmd-zet/internal/lib"
|
||||
)
|
||||
|
||||
var titlesCmd = &cobra.Command{
|
||||
Use: "titles",
|
||||
Aliases: []string{"t"},
|
||||
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) {
|
||||
zetDir := "/home/opdavies/Documents/zet"
|
||||
|
||||
zets := lib.GetAllZets(zetDir)
|
||||
|
||||
lib.ParseZetList(zets)
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue