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
database/sql: confusing documentation for DefaultParameterConverter #11489
Comments
@johto I think that was meant to catch stuff like |
I get |
Oh, so it's about the underlying type when the type returns false for IsValue(). Can we make it explicitly say that? |
CC @bradfitz |
CL https://golang.org/cl/18520 mentions this issue. |
Hi,
In the documentation for DefaultParameterConvert we have this passage (emphasis mine):
DefaultParameterConverter returns the given value directly if IsValue(value).
Otherwise integer type are converted to int64, floats to float64, and strings to
[]byte. Other types are an error.
However, if we look at the code, even all the way back to 1.0 IsValue has returned true for
string
. Thus, I don't see how a string could ever be converted to []byte.Am I misreading this, or is the documentation incorrect?
The text was updated successfully, but these errors were encountered: