mirror of
https://github.com/taigrr/wtf
synced 2026-03-21 04:32:16 -07:00
Improve styling + remove unused code
* Got rid of unused struct fields, unused settings, added some comments to functions + structs
This commit is contained in:
committed by
Casey Primozic
parent
0be63a404c
commit
3c95d8e39d
@@ -15,22 +15,17 @@ const (
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
consumerKey string
|
||||
consumerSecret string
|
||||
accessToken string
|
||||
accessTokenSecret string
|
||||
|
||||
screenNames []interface{}
|
||||
consumerKey string
|
||||
consumerSecret string
|
||||
screenNames []interface{}
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||
|
||||
consumerKey: ymlConfig.UString("consumerKey", os.Getenv("WTF_TWITTER_CONSUMER_KEY")),
|
||||
consumerSecret: ymlConfig.UString("consumerSecret", os.Getenv("WTF_TWITTER_CONSUMER_SECRET")),
|
||||
accessToken: ymlConfig.UString("accessToken", os.Getenv("WTF_TWITTER_ACCESS_TOKEN")),
|
||||
accessTokenSecret: ymlConfig.UString("accessTokenSecret", os.Getenv("WTF_TWITTER_ACCESS_TOKEN_SECRET")),
|
||||
consumerKey: ymlConfig.UString("consumerKey", os.Getenv("WTF_TWITTER_CONSUMER_KEY")),
|
||||
consumerSecret: ymlConfig.UString("consumerSecret", os.Getenv("WTF_TWITTER_CONSUMER_SECRET")),
|
||||
|
||||
screenNames: ymlConfig.UList("screenNames"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user