Refactor
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
a3202aaff3
commit
948872b933
7 changed files with 206 additions and 150 deletions
21
internal/zet/parse.go
Normal file
21
internal/zet/parse.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package zet
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func ParseZetList(ids []int) []string {
|
||||
var lines []string
|
||||
|
||||
green := "\033[32m"
|
||||
reset := "\033[0m"
|
||||
|
||||
for _, num := range ids {
|
||||
line := fmt.Sprintf("%s%s%s %s", green, strconv.Itoa(num), reset, getTitle(num))
|
||||
|
||||
lines = append(lines, line)
|
||||
}
|
||||
|
||||
return lines
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue