1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-27 13:42:21 -07:00

Fix warning with type conversion from rune + int to string

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer
2020-09-25 06:47:28 -07:00
parent cae3ae7c4b
commit d672f57c14
3 changed files with 40 additions and 18 deletions

View File

@@ -124,12 +124,18 @@ func (common *Common) DefaultRowColor() string {
)
}
// FocusChar returns the keyboard number assigned to the widget used to give onscreen
// focus to this widget, as a string. Focus characters can be a range between 1 and 9
func (common *Common) FocusChar() string {
if common.focusChar <= -1 {
if common.focusChar <= 0 {
return ""
}
return string('0' + common.focusChar)
if common.focusChar > 9 {
return ""
}
return fmt.Sprint(common.focusChar)
}
func (common *Common) RowColor(idx int) string {