func Open(name string) (*DataSource, error) { namec := C.CString(name) defer C.free(unsafe.Pointer(namec)) ds := C.OGROpen(namec, 0, nil) if ds == nil { return nil, lastOgrError("failed to open") } return &DataSource{ds}, nil }
// Open a file / data source with one of the registered drivers func OpenDataSource(name string, update int) DataSource { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) ds := C.OGROpen(cName, C.int(update), nil) return DataSource{ds} }