This commit is contained in:
Mahdi Abu Yasmine 2023-11-03 01:34:46 +01:00
parent f8de6f01e7
commit 3792c0f481
8 changed files with 24 additions and 8 deletions

View File

@ -1,4 +1,4 @@
module gitea.meta-tech.academy/core/config
module gitea.meta-tech.academy/go/core/config
go 1.20

View File

@ -6,9 +6,14 @@ import (
"regexp"
"strings"
"gitea.meta-tech.academy/go/core/sys"
"gopkg.in/yaml.v3"
)
func tutu() {
sys.RunShellCmd("ls -la")
}
type Cfg interface {
GetVar() []VarConfig
}
@ -39,6 +44,7 @@ func LoadConfig(path string, out Cfg, varPattern *VarPattern) {
cl.parse()
cl.refstr = []*reflect.Value{}
// cl.setConfigPtr(outi)
tutu()
}
func (cl *ConfigLoader) findVarName(match string) string {

View File

@ -1,3 +1,7 @@
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0=
github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=

View File

@ -1,10 +1,13 @@
module gitea.meta-tech.academy/core/style
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
golang.org/x/sys v0.13.0 // indirect
golang.org/x/sys v0.10.0 // 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=
@ -5,5 +7,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@ -3,7 +3,7 @@ package style
import (
"fmt"
"strings"
"gitea.meta-tech.academy/go/core/util"
"github.com/gookit/color"
)

View File

@ -1,4 +1,4 @@
module gitea.meta-tech.academy/core/sys
module gitea.meta-tech.academy/go/core/sys
go 1.20

View File

@ -1,3 +1,3 @@
module gitea.meta-tech.academy/core/util
module gitea.meta-tech.academy/go/core/util
go 1.20