Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
4d11b5354c
commit
7b6712e05a
6 changed files with 8 additions and 8 deletions
|
@ -52,7 +52,7 @@ zet edit|e latest
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
zetList := zet.CreateZetList(ids)
|
||||
zetList := zet.NewZetList(ids)
|
||||
|
||||
zets := zetList.Parse()
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ If -j or --json is added, the results will be in JSON format.`,
|
|||
zets := zet.SearchZets(args[0])
|
||||
|
||||
if jsonOutput {
|
||||
zetList := zet.CreateZetList(zets, false)
|
||||
zetList := zet.NewZetList(zets, false)
|
||||
|
||||
result := zetList.Parse()
|
||||
|
||||
|
@ -40,7 +40,7 @@ If -j or --json is added, the results will be in JSON format.`,
|
|||
|
||||
fmt.Println(json)
|
||||
} else {
|
||||
zetList := zet.CreateZetList(zets)
|
||||
zetList := zet.NewZetList(zets)
|
||||
|
||||
result := zetList.Parse()
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ var linksCmd = &cobra.Command{
|
|||
|
||||
zets := zet.SearchZets(args[0])
|
||||
|
||||
zetList := zet.CreateZetList(zets)
|
||||
zetList := zet.NewZetList(zets)
|
||||
|
||||
lines := zetList.Parse()
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ If -j or --json is added, the results will be in JSON format.`,
|
|||
zets := zet.GetAllZets()
|
||||
|
||||
if jsonOutput {
|
||||
zetList := zet.CreateZetList(zets, false)
|
||||
zetList := zet.NewZetList(zets, false)
|
||||
|
||||
result := zetList.Parse()
|
||||
|
||||
|
@ -33,7 +33,7 @@ If -j or --json is added, the results will be in JSON format.`,
|
|||
|
||||
fmt.Println(json)
|
||||
} else {
|
||||
zetList := zet.CreateZetList(zets)
|
||||
zetList := zet.NewZetList(zets)
|
||||
|
||||
result := zetList.Parse()
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ zet view|v latest
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
zetList := zet.CreateZetList(ids)
|
||||
zetList := zet.NewZetList(ids)
|
||||
|
||||
zets := zetList.Parse()
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ type ZetList struct {
|
|||
UseColors bool
|
||||
}
|
||||
|
||||
func CreateZetList(ids []int, useColors ...bool) *ZetList {
|
||||
func NewZetList(ids []int, useColors ...bool) *ZetList {
|
||||
colorSetting := true
|
||||
|
||||
if len(useColors) > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue