doc/faq: fix error format bug (#2200)

This commit is contained in:
peanut-pg
2021-12-06 14:44:12 +08:00
committed by GitHub
parent 7dba6969fa
commit 2fa80c83c9

View File

@@ -296,11 +296,11 @@ func (i *Inet) Scan(value interface{}) (err error) {
case nil:
case []byte:
if i.IP = net.ParseIP(string(v)); i.IP == nil {
err = fmt.Errorf("invalid value for ip %q", s)
err = fmt.Errorf("invalid value for ip %q", v)
}
case string:
if i.IP = net.ParseIP(v); i.IP == nil {
err = fmt.Errorf("invalid value for ip %q", s)
err = fmt.Errorf("invalid value for ip %q", v)
}
default:
err = fmt.Errorf("unexpected type %T", v)