1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

A few minor changes made while updating documentation

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer 2019-12-30 17:26:50 -05:00
parent ac2817613b
commit fa0d8761ae
5 changed files with 15 additions and 15 deletions

View File

@ -26,7 +26,7 @@ THIS_FILE := $(lastword $(MAKEFILE_LIST))
APP=wtfutil
# -------------------- Actions -------------------- #
# -------------------- Actions -------------------- #
## build: builds a local version
build:
@ -72,7 +72,7 @@ install:
## lint: runs a number of code quality checks against the source code
lint:
# https://github.com/kisielk/errcheck
@echo "\033[35mhttps://github.com/kisielk/errcheck\033[0m"
errcheck ./app
errcheck ./cfg
errcheck ./flags
@ -84,7 +84,7 @@ lint:
errcheck ./wtf
errcheck ./main.go
# https://golang.org/cmd/vet/
@echo "\033[35mhttps://golang.org/cmd/vet/k\033[0m"
go vet ./app
go vet ./cfg
go vet ./flags
@ -96,7 +96,7 @@ lint:
go vet ./wtf
go vet ./main.go
# https://staticcheck.io/docs/
@echo "\033[35m# https://staticcheck.io/docs/k\033[0m"
staticcheck ./app
staticcheck ./cfg
staticcheck ./flags

View File

@ -16,11 +16,11 @@ const (
type Settings struct {
common *cfg.Common
labelColor string
apiToken string `help:"Your Azure DevOps Access Token."`
labelColor string
maxRows int
orgURL string `help:"Your Azure DevOps organization URL."`
projectName string
maxRows int
}
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
@ -28,11 +28,11 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocus, ymlConfig, globalConfig),
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE_DEVOPS_API_TOKEN")),
labelColor: ymlConfig.UString("labelColor", "white"),
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE DEVOPS_API_TOKEN")),
maxRows: ymlConfig.UInt("maxRows", 3),
orgURL: ymlConfig.UString("orgURL", os.Getenv("WTF_AZURE_DEVOPS_ORG_URL")),
projectName: ymlConfig.UString("projectName", os.Getenv("WTF_AZURE_DEVOPS_PROJECT_NAME")),
maxRows: ymlConfig.UInt("maxRows", 3),
}
return &settings

View File

@ -11,14 +11,14 @@ const (
)
type Settings struct {
common *cfg.Common
common *cfg.Common
cpuCombined bool
}
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
settings := Settings{
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
cpuCombined: ymlConfig.UBool("cpuCombined"),
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
cpuCombined: ymlConfig.UBool("cpuCombined", false),
}
return &settings

View File

@ -5,17 +5,17 @@ import "github.com/gdamore/tcell"
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeCommonControls(widget.Refresh)
widget.SetKeyboardChar("c", widget.Close, "Close item")
widget.SetKeyboardChar("d", widget.Delete, "Delete item")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
widget.SetKeyboardChar("j", widget.Prev, "Select previous item")
widget.SetKeyboardChar("k", widget.Next, "Select next item")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
widget.SetKeyboardChar("c", widget.Close, "Close item")
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")
widget.SetKeyboardChar("u", widget.Unselect, "Clear selection")
widget.SetKeyboardKey(tcell.KeyDown, widget.Next, "Select next item")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
widget.SetKeyboardKey(tcell.KeyEsc, widget.Unselect, "Clear selection")
widget.SetKeyboardKey(tcell.KeyLeft, widget.PrevSource, "Select previous project")
widget.SetKeyboardKey(tcell.KeyRight, widget.NextSource, "Select next project")
widget.SetKeyboardKey(tcell.KeyUp, widget.Prev, "Select previous item")
}

View File

@ -27,7 +27,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
accessToken: ymlConfig.UString("accessToken", ymlConfig.UString("apikey", os.Getenv("WTF_TRELLO_ACCESS_TOKEN"))),
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_TRELLO_APP_KEY")),
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_TRELLO_API_KEY")),
board: ymlConfig.UString("board"),
username: ymlConfig.UString("username"),
}