summaryrefslogtreecommitdiff
path: root/go/luhn/luhn.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <sokolyuk@gmail.com>2022-11-22 14:06:43 +0100
committerDimitri Sokolyuk <sokolyuk@gmail.com>2022-11-22 14:06:43 +0100
commit62966e2253ff5a045852e46b443c5c2a9e7f9f63 (patch)
tree43f8ae603e8aa5110ba0c6f5302c60f056cf7cbf /go/luhn/luhn.go
parente27f94c1228ab6991bf3a6ca2475cdaf1ee77dd2 (diff)
Fix "did you mean fmt.Sprint(x)?"
Diffstat (limited to 'go/luhn/luhn.go')
-rw-r--r--go/luhn/luhn.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/luhn/luhn.go b/go/luhn/luhn.go
index c11cde3..5da01f7 100644
--- a/go/luhn/luhn.go
+++ b/go/luhn/luhn.go
@@ -38,5 +38,5 @@ func Valid(s string) bool {
func AddCheck(s string) string {
sum := chksum(normalize(s + "9"))
n := 9 - sum%10
- return s + string('0'+n)
+ return s + string('0'+rune(n))
}