提交 f1170f98 编写于 作者: M Mislav Marohnić

Fix compiling on Go 1.15

Fixes https://github.com/github/hub/issues/2616
上级 21c4b491
package ui package ui
import ( import (
"fmt"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
...@@ -114,7 +115,7 @@ func (f *expander) expandSpecialChar(firstChar byte, format string) (expand stri ...@@ -114,7 +115,7 @@ func (f *expander) expandSpecialChar(firstChar byte, format string) (expand stri
case 'x': case 'x':
if len(format) >= 2 { if len(format) >= 2 {
if v, err := strconv.ParseInt(format[:2], 16, 32); err == nil { if v, err := strconv.ParseInt(format[:2], 16, 32); err == nil {
return string(v), format[2:], true return fmt.Sprintf("%c", v), format[2:], true
} }
} }
case '+': case '+':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册