Skip to content

database/sql: confusing documentation for DefaultParameterConverter #11489

Closed
@johto

Description

@johto

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions