skip2 / go-qrcode

:sparkles: QR Code encoder (Go)
http://go-qrcode.appspot.com
MIT License
2.58k stars 335 forks source link

Fix Tests (conversion from int to string) #53

Open lkiesow opened 2 years ago

lkiesow commented 2 years ago

Running the tests with newer versions of Go fails with the following error:

# github.com/skip2/go-qrcode
./qrcode_decode_test.go:125:14: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
./qrcode_decode_test.go:157:15: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
FAIL    github.com/skip2/go-qrcode [build failed]

Run into the bug wuth:

% go version
go version go1.16.8 linux/amd64

This patch patch fixes the issue by converting int to string using rune().