change dir structure

This commit is contained in:
Mahdi Abu Yasmine 2023-11-03 00:01:57 +01:00
parent c719e245b9
commit b7cc2aa66b
13 changed files with 13 additions and 6 deletions

View File

@ -1,8 +1,9 @@
go 1.20
use (
./config
./style
./util
./sys
.
./src/config
./src/style
./src/sys
./src/util
)

View File

@ -2,7 +2,10 @@ module gitea.meta-tech.academy/go/core/style
go 1.20
require github.com/gookit/color v1.5.4
require (
gitea.meta-tech.academy/go/core/util v0.0.0-20231102220428-c719e245b956
github.com/gookit/color v1.5.4
)
require (
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect

View File

@ -1,3 +1,5 @@
gitea.meta-tech.academy/go/core/util v0.0.0-20231102220428-c719e245b956 h1:XxyPD/jBTPqrf2o1N3QRmw8fPgvP7G9Z9Ba3DgH/Uz0=
gitea.meta-tech.academy/go/core/util v0.0.0-20231102220428-c719e245b956/go.mod h1:q+p8vM+aQ36GVspuTTupRBNDUKrsXCccx4k3f7IKfx8=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0=
github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w=

View File

@ -71,6 +71,7 @@ func NewStyleByDef(def string) *Style {
s = color.HEXStyle(c[0], c[1])
}
for _, elm := range o {
s.AddOpts(color.Color(util.str2int(elm, 10, 0)))
}
// s.Printf(" %-20s\n", d[KEY_STYLE_NAME])