update to new go-app
This commit is contained in:
23
pkg/config/custom.go
Normal file
23
pkg/config/custom.go
Normal file
@ -0,0 +1,23 @@
|
||||
// This serves as a reference sample configuration
|
||||
// to show how to merge custom config fields into
|
||||
// go-app configuration
|
||||
package config
|
||||
|
||||
import (
|
||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
||||
)
|
||||
|
||||
type DemoConfig struct {
|
||||
DemoField int `yaml:"demoField" json:"demoField,omitempty"`
|
||||
DemoType *DemoOpts `yaml:"demoType" json:"demoType,omitempty"`
|
||||
|
||||
// Embeds go-app config, used by go-app to
|
||||
// merge custom config into go-app config, and to produce
|
||||
// a complete configuration json schema
|
||||
*config.AppConfig
|
||||
}
|
||||
|
||||
type DemoOpts struct {
|
||||
OptField int `yaml:"optField" json:"optField,omitempty"`
|
||||
OptName string `yaml:"optName" json:"optName,omitempty"`
|
||||
}
|
Reference in New Issue
Block a user