Closed hidehalo closed 3 years ago
If you are working on project 2(implement&test JoinTable for SQL parser), you maybe would get an error as below:
./lexer_test.go:199:12: conversion from untyped int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
that code block looked like:
191 func (s *testLexerSuite) TestscanString(c *C) { 192 table := []struct { 193 raw string 194 expect string 195 }{ 196 {`' \n\tTest String'`, " \n\tTest String"}, 197 {`'\x\B'`, "xB"}, 198 {`'\0\'\"\b\n\r\t\\'`, "\000'\"\b\n\r\t\\"}, 199 {`'\Z'`, string(26)},// Error
It broke tests but not a user cause
use hardcoded string
Description
If you are working on project 2(implement&test JoinTable for SQL parser), you maybe would get an error as below:
that code block looked like:
It broke tests but not a user cause
Advice
use hardcoded string