change dir structure
This commit is contained in:
parent
c719e245b9
commit
b7cc2aa66b
9
go.work
9
go.work
|
@ -1,8 +1,9 @@
|
|||
go 1.20
|
||||
|
||||
use (
|
||||
./config
|
||||
./style
|
||||
./util
|
||||
./sys
|
||||
.
|
||||
./src/config
|
||||
./src/style
|
||||
./src/sys
|
||||
./src/util
|
||||
)
|
||||
|
|
|
@ -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
|
|
@ -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=
|
|
@ -3,7 +3,7 @@ package style
|
|||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"gitea.meta-tech.academy/go/core/util"
|
||||
"gitea.meta-tech.academy/go/core/util"
|
||||
"github.com/gookit/color"
|
||||
)
|
||||
|
||||
|
@ -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])
|
Loading…
Reference in New Issue
Block a user