Blame 0001-Use-more-explicit-int-to-string-conversion.patch

39b12b8
From cab32ead2291fdbe5f5c284c71a693705533c700 Mon Sep 17 00:00:00 2001
39b12b8
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
39b12b8
Date: Sat, 2 Jan 2021 23:25:43 -0500
39b12b8
Subject: [PATCH] Use more explicit int-to-string conversion.
39b12b8
39b12b8
This fixes the following errors with Go 1.15:
39b12b8
```
39b12b8
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)?)
39b12b8
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)?)
39b12b8
```
39b12b8
39b12b8
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
39b12b8
---
39b12b8
 src/options.go | 4 ++--
39b12b8
 1 file changed, 2 insertions(+), 2 deletions(-)
39b12b8
39b12b8
diff --git a/src/options.go b/src/options.go
39b12b8
index 12c0955..cee11ff 100644
39b12b8
--- a/src/options.go
39b12b8
+++ b/src/options.go
39b12b8
@@ -449,7 +449,7 @@ func parseKeyChords(str string, message string) map[tui.Event]string {
39b12b8
 		errorExit(message)
39b12b8
 	}
39b12b8
 
39b12b8
-	str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string(escapedComma))
39b12b8
+	str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string([]rune{escapedComma}))
39b12b8
 	tokens := strings.Split(str, ",")
39b12b8
 	if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Contains(str, ",,,") {
39b12b8
 		tokens = append(tokens, ",")
39b12b8
@@ -460,7 +460,7 @@ func parseKeyChords(str string, message string) map[tui.Event]string {
39b12b8
 		if len(key) == 0 {
39b12b8
 			continue // ignore
39b12b8
 		}
39b12b8
-		key = strings.ReplaceAll(key, string(escapedComma), ",")
39b12b8
+		key = strings.ReplaceAll(key, string([]rune{escapedComma}), ",")
39b12b8
 		lkey := strings.ToLower(key)
39b12b8
 		add := func(e tui.EventType) {
39b12b8
 			chords[e.AsEvent()] = key
39b12b8
-- 
39b12b8
2.29.2
39b12b8