go-qrcode icon indicating copy to clipboard operation
go-qrcode copied to clipboard

Fix Tests (conversion from int to string)

Open lkiesow opened this issue 3 years ago • 0 comments

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().

lkiesow avatar Nov 06 '21 18:11 lkiesow