@@ -25,22 +25,22 @@ var drivers = make(map[string]Driver)
25
25
// Driver is the interface every database driver must implement.
26
26
//
27
27
// How to implement a database driver?
28
- // 1. Implement this interface.
29
- // 2. Optionally, add a function named `WithInstance`.
30
- // This function should accept an existing DB instance and a Config{} struct
31
- // and return a driver instance.
32
- // 3. Add a test that calls database/testing.go:Test()
33
- // 4. Add own tests for Open(), WithInstance() (when provided) and Close().
34
- // All other functions are tested by tests in database/testing.
35
- // Saves you some time and makes sure all database drivers behave the same way.
36
- // 5. Call Register in init().
37
- // 6. Create a internal/cli/build_<driver-name>.go file
38
- // 7. Add driver name in 'DATABASE' variable in Makefile
28
+ // 1. Implement this interface.
29
+ // 2. Optionally, add a function named `WithInstance`.
30
+ // This function should accept an existing DB instance and a Config{} struct
31
+ // and return a driver instance.
32
+ // 3. Add a test that calls database/testing.go:Test()
33
+ // 4. Add own tests for Open(), WithInstance() (when provided) and Close().
34
+ // All other functions are tested by tests in database/testing.
35
+ // Saves you some time and makes sure all database drivers behave the same way.
36
+ // 5. Call Register in init().
37
+ // 6. Create a internal/cli/build_<driver-name>.go file
38
+ // 7. Add driver name in 'DATABASE' variable in Makefile
39
39
//
40
40
// Guidelines:
41
- // * Don't try to correct user input. Don't assume things.
41
+ // - Don't try to correct user input. Don't assume things.
42
42
// When in doubt, return an error and explain the situation to the user.
43
- // * All configuration input must come from the URL string in func Open()
43
+ // - All configuration input must come from the URL string in func Open()
44
44
// or the Config{} struct in WithInstance. Don't os.Getenv().
45
45
type Driver interface {
46
46
// Open returns a new driver instance configured with parameters
0 commit comments