package
0.0.0-20211113074651-c6ea6ab4ee08
Repository: https://github.com/tsaikd/kdgolib.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
cobrather
Modularized command
- Simple Module
// Module info
var Module = &cobrather.Module{
Use: "example",
Commands: []*cobrather.Module{
cobrather.VersionModule, // sub command module
},
}
func main() {
Module.MustMainRun()
}
- Custom viper for more config for environment
// Module info
var Module = &cobrather.Module{
Use: "example",
Commands: []*cobrather.Module{
cobrather.VersionModule, // sub command module
},
}
func main() {
vr := viper.New()
vr.AutomaticEnv()
vr.SetEnvPrefix("ENVPREFIX")
Module.MustMainRun(
cobrather.MainRunOptionViper(vr),
)
}