http://golang.org/src/pkg/database/sql/driver/types.go
30 type ValueConverter interface {
31 // ConvertValue converts a value to a driver Value.
32 ConvertValue(v interface{}) (Value, error)
33 }
54 var Bool boolType
55
56 type boolType struct{}
57
58 var _ ValueConverter = boolType{}
59
60 func (boolType) String() string { return "Bool" }
61
62 func (boolType) ConvertValue(src interface{}) (Value, error) {....}
Come sopra, ho saputo che ValueConverter è un nome di interfaccia, la riga 58 sembra dichiarare che l'interfaccia di strumento boolType ValueConverter, è necessario? Ho cancellato la riga 58, il codice funziona benecosa significa un underscore e il nome dell'interfaccia dopo la parola chiave var in golang?
[vedere anche] (http://stackoverflow.com/q/12843132/720999) – kostix
Probabilmente è ora di accettare una di quelle risposte ora. –