Skip to content
Myr

Use more explicit int-to-string conversion.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This fixes the following errors with Go 1.15: ``` src/options.go:452:69: conversion from untyped int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) src/options.go:463:33: conversion from untyped int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) ```

authored by Elliott Sales de Andrade · committed by Junegunn Choi · parent 8c533e3 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/options.go+2 added-2 removed
447 unmodified lines
448 if len(str) == 0 {449 errorExit(message)450 }451452 str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string(escapedComma))452 str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string([]rune{escapedComma}))453 tokens := strings.Split(str, ",")454 if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Contains(str, ",,,") {455 tokens = append(tokens, ",")456 }
2 unmodified lines
459 for _, key := range tokens {460 if len(key) == 0 {461 continue // ignore462 }463 key = strings.ReplaceAll(key, string(escapedComma), ",")463 key = strings.ReplaceAll(key, string([]rune{escapedComma}), ",")464 lkey := strings.ToLower(key)465 add := func(e tui.EventType) {466 chords[e.AsEvent()] = key467 }
1132 unmodified lines