From http://golang.org/src/pkg/database/sql/driver/types.go:
type ValueConverter interface {
// ConvertValue converts a value to a driver Value.
ConvertValue(v interface{}) (Value, error)
}
var Bool boolType
type boolType struct{}
var _ ValueConverter = boolType{} // line 58
func (boolType) String() string { return "Bool" }
func (boolType) ConvertValue(src interface{}) (Value, error) {....}
I known that ValueConverter is an interface name. Line 58 seems to declare that boolType implement interface ValueConverter, but is that necessary? I deleted line 58 and the code works well.
_
se puede usar para proporcionar estrictamente las claves en una estructura. Vea esto como referencia