We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4743948 commit 3159e66Copy full SHA for 3159e66
README.md
@@ -11,11 +11,15 @@ The `sqlds` package is intended to remove the repetition of these datasources an
11
**Usage**
12
13
```go
14
-ds := sqlds.NewDatasource(&myDatasource{})
15
-if err := datasource.Manage("my-datasource", ds.NewDatasource, datasource.ManageOpts{}); err != nil {
+if err := datasource.Manage("my-datasource", datasourceFactory, datasource.ManageOpts{}); err != nil {
16
log.DefaultLogger.Error(err.Error())
17
os.Exit(1)
18
}
+
19
+func datasourceFactory(s backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
20
+ ds := sqlds.NewDatasource(&myDatasource{})
21
+ return ds.NewDatasource(s)
22
+}
23
```
24
25
## Standardization
0 commit comments