mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
25 lines
654 B
Go
25 lines
654 B
Go
package docker
|
|
|
|
import (
|
|
"github.com/olebedev/config"
|
|
"github.com/wtfutil/wtf/cfg"
|
|
)
|
|
|
|
const defaultTitle = "docker"
|
|
|
|
// Settings defines the configuration options for this module
|
|
type Settings struct {
|
|
common *cfg.Common
|
|
labelColor string
|
|
}
|
|
|
|
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
|
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
|
settings := Settings{
|
|
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
|
|
labelColor: ymlConfig.UString("labelColor", "white"),
|
|
}
|
|
|
|
return &settings
|
|
}
|