Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tests (conversion from int to string) #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lkiesow
Copy link

@lkiesow lkiesow commented Nov 6, 2021

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

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()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant