Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
97445ca2cd
commit
ba5f26056f
6 changed files with 17 additions and 18 deletions
|
@ -20,15 +20,13 @@ 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"
|
||||
|
||||
if len(args) < 1 {
|
||||
fmt.Println("No query")
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
zets := lib.SearchZets(zetDir, args[0])
|
||||
zets := lib.SearchZets(args[0])
|
||||
|
||||
lib.ParseZetList(zets)
|
||||
},
|
||||
|
|
|
@ -17,9 +17,7 @@ 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)
|
||||
zets := lib.GetAllZets()
|
||||
|
||||
lib.ParseZetList(zets)
|
||||
},
|
||||
|
|
|
@ -32,8 +32,6 @@ to quickly create a Cobra application.`,
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
zetDir := "/home/opdavies/Documents/zet"
|
||||
|
||||
fmt.Println(lib.ViewZet(zetDir, idInt))
|
||||
fmt.Println(lib.ViewZet(idInt))
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue