OSDN Git Service

libgo: Update to weekly.2011-12-06.
[pf3gnuchains/gcc-fork.git] / libgo / go / exp / sql / driver / types.go
index 6e0ce43..086b529 100644 (file)
@@ -54,13 +54,13 @@ func (boolType) ConvertValue(src interface{}) (interface{}, error) {
        case bool:
                return s, nil
        case string:
-               b, err := strconv.Atob(s)
+               b, err := strconv.ParseBool(s)
                if err != nil {
                        return nil, fmt.Errorf("sql/driver: couldn't convert %q into type bool", s)
                }
                return b, nil
        case []byte:
-               b, err := strconv.Atob(string(s))
+               b, err := strconv.ParseBool(string(s))
                if err != nil {
                        return nil, fmt.Errorf("sql/driver: couldn't convert %q into type bool", s)
                }