1 Star 0 Fork 0

木桩 / wgs.ths.code.generate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.go 748 Bytes
一键复制 编辑 原始数据 按行查看 历史
木桩 提交于 2024-01-02 17:49 . [v0_1] 基础功能开发完成
package definition
import (
config "gitee.com/woodpile/wgs.ths.config.go"
)
func init() {
config.DefaultContext.RegisterRootConfig(GlobalConfig)
}
type Config struct {
Verbose bool `yaml:"verbose,omitempty"`
Cmd interface{} `yaml:"cmd,omitempty"`
Parser *ParserConfig `yaml:"parser,omitempty"`
Generator *GeneratorConfig `yaml:"generator,omitempty"`
Template *TemplateConfig `yaml:"template,omitempty"`
Script *ScriptConfig `yaml:"script,omitempty"`
}
var GlobalConfig = &Config{
Verbose: false,
}
func (*Config) Name() string {
return "root"
}
func (*Config) ToDefault(cfg config.IConfigDefault) {
ac := cfg.(*Config)
ac.Verbose = false
ac.Parser = &ParserConfig{}
ac.Generator = &GeneratorConfig{}
}
Go
1
https://gitee.com/woodpile/wgs.ths.code.generate.git
git@gitee.com:woodpile/wgs.ths.code.generate.git
woodpile
wgs.ths.code.generate
wgs.ths.code.generate
v0.1.4

搜索帮助