File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,13 @@ import (
99 "github.com/umutphp/awesome-cli/internal/package/favourite"
1010)
1111
12- // VERSION of the cli
13- const VERSION = "0.3.0"
12+ const (
13+ CACHE_KEY = "awesome"
14+ // VERSION of the cli
15+ VERSION = "0.3.0"
16+ )
17+
18+
1419
1520func main () {
1621 args := os .Args [1 :]
@@ -47,7 +52,7 @@ func RandomRepo(man manager.Manager) {
4752}
4853
4954func SurpriseRepo (man manager.Manager ) {
50- favourites := favourite .NewFromCache ("awesome" )
55+ favourites := favourite .NewFromCache (CACHE_KEY )
5156
5257 if len (favourites .GetChildren ()) == 0 {
5358 RandomRepo (man )
@@ -61,13 +66,13 @@ func SurpriseRepo(man manager.Manager) {
6166}
6267
6368func Reset (man manager.Manager ) {
64- favourites := favourite .New ("awesome" )
69+ favourites := favourite .New (CACHE_KEY )
6570 favourites .SaveCache ()
6671 fmt .Println ("The choice list has been cleared." )
6772}
6873
6974func Profile (man manager.Manager ) {
70- favourites := favourite .NewFromCache ("awesome" )
75+ favourites := favourite .NewFromCache (CACHE_KEY )
7176 fmt .Println ("" )
7277 fmt .Println ("Your choices:" )
7378
@@ -122,7 +127,7 @@ func Argumented(param []string, man manager.Manager) {
122127func Walk (man manager.Manager ) {
123128 cursor := man .Root
124129 i := 0
125- favourites := favourite .NewFromCache ("awesome" )
130+ favourites := favourite .NewFromCache (CACHE_KEY )
126131 firstsel := ""
127132
128133 for {
You can’t perform that action at this time.
0 commit comments