github.com/wtfutil/wtf@v0.43.0/modules/docker/settings.go (about) 1 package docker 2 3 import ( 4 "github.com/olebedev/config" 5 "github.com/wtfutil/wtf/cfg" 6 ) 7 8 const ( 9 defaultFocusable = false 10 defaultTitle = "docker" 11 ) 12 13 // Settings defines the configuration options for this module 14 type Settings struct { 15 *cfg.Common 16 17 labelColor string 18 } 19 20 // NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated 21 func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings { 22 settings := Settings{ 23 Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig), 24 labelColor: ymlConfig.UString("labelColor", "white"), 25 } 26 27 return &settings 28 }