Standard library / database/sql/driver

driver.IsScanValue()

Reports whether a value is a valid scan value; delegates to IsValue. Expected stdout: 'true false\n'.

Formal Syntax & Structure

go syntaxgo
func IsScanValue(v any) bool

Parameters & Attributes

NameTypeDescription
vanyInput to the operation as described above.

Return Value

bool

Reports whether a value is a valid scan value; delegates to IsValue. Check returned errors where applicable.

Working Example

Example Snippetgo
package main
import (  "database/sql/driver"  "fmt")
func main() { fmt.Println(driver.IsScanValue(nil), driver.IsScanValue(struct{}{})) }
Go Reference