{"record":{"id":"efb939c71cbc46db","repo":"golang-migrate/migrate","slug":"not-yet-implemented","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"source/go_bindata/go-bindata.go","lineNumber":37,"sourceCode":"}\n\ntype AssetSource struct {\n\tNames     []string\n\tAssetFunc AssetFunc\n}\n\nfunc init() {\n\tsource.Register(\"go-bindata\", &Bindata{})\n}\n\ntype Bindata struct {\n\tpath        string\n\tassetSource *AssetSource\n\tmigrations  *source.Migrations\n}\n\nfunc (b *Bindata) Open(url string) (source.Driver, error) {\n\treturn nil, fmt.Errorf(\"not yet implemented\")\n}\n\nvar (\n\tErrNoAssetSource = fmt.Errorf(\"expects *AssetSource\")\n)\n\nfunc WithInstance(instance interface{}) (source.Driver, error) {\n\tif _, ok := instance.(*AssetSource); !ok {\n\t\treturn nil, ErrNoAssetSource\n\t}\n\tas := instance.(*AssetSource)\n\n\tbn := &Bindata{\n\t\tpath:        \"<go-bindata>\",\n\t\tassetSource: as,\n\t\tmigrations:  source.NewMigrations(),\n\t}\n","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/golang-migrate/migrate/blob/01a9643f1475e75bb6d6224ddeaf9d8e2434ca8a/source/go_bindata/go-bindata.go#L19-L55","documentation":"The go-bindata source driver's Open method is a stub that unconditionally returns 'not yet implemented'. The driver only supports instantiation via WithInstance with an *AssetSource, so constructing it from a URL string is not supported at all in this version of the library.","triggerScenarios":"Calling bindata.Open(url) directly, or database.Open with a bindata:// URL that routes through the driver's Open method (as TestOpen does).","commonSituations":"Developers assuming all source drivers support URL-based opening; following documentation or examples written for other drivers (file, http) and applying the same pattern to bindata.","solutions":["Use WithInstance(&AssetSource{...}) to construct the driver instead of Open","Register the driver instance with migrate.NewWithInstance(\"bindata\", driver) rather than using a bindata:// URL","If URL-based opening is required, check whether a newer version of the library implements it"],"exampleFix":"// before\nd, err := bindata.Open(\"bindata://migrations\")\n// after\nas := &bindata.AssetSource{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo}\nd, err := bindata.WithInstance(as)\nm, err := migrate.NewWithInstance(\"bindata\", d)","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"d, err := bindataDriver.Open(u)\nif err != nil {\n    // Open is unimplemented for bindata; fall back to WithInstance\n    return bindata.WithInstance(assetSource)\n}","preventionTips":["Never use bindata:// URLs; always construct via WithInstance","Read the driver docs to see which constructor it supports","Wrap driver construction in a helper so the fallback lives in one place"],"tags":["go-bindata","not-implemented","api"],"backgroundTag":"not-implemented","analyzedSha":"01a9643f1475e75bb6d6224ddeaf9d8e2434ca8a","analyzedAt":"2026-09-02T19:38:29.671Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}