From 9574b3e083fd3d6166903a312a0c583eb5fcb7c4 Mon Sep 17 00:00:00 2001 From: mahdi Date: Fri, 3 Nov 2023 22:51:18 +0100 Subject: [PATCH] amend --- style/style.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/style/style.go b/style/style.go index b23374d..77f8ee5 100644 --- a/style/style.go +++ b/style/style.go @@ -5,6 +5,7 @@ import ( "strconv" "strings" + "gitea.meta-tech.academy/go/core/util" "github.com/gookit/color" ) @@ -56,7 +57,7 @@ func NewStyleByDef(def string) *Style { if len(d) > KEY_STYLE_OPTION { o = strings.Split(d[KEY_STYLE_OPTION], ",") } - prependToSliceStr(&c, "#") + util.PrependToSliceStr(&c, "#") var s *color.RGBStyle switch len(c) { case 1: @@ -66,7 +67,7 @@ func NewStyleByDef(def string) *Style { } for _, elm := range o { - s.AddOpts(color.Color(str2int(elm, 10, 0))) + s.AddOpts(color.Color(util.Str2int(elm, 10, 0))) } // s.Printf(" %-20s\n", d[KEY_STYLE_NAME]) return &Style{s, d[KEY_STYLE_NAME]}