24 lines
682 B
Go
24 lines
682 B
Go
// 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"`
|
|
}
|