Thanks to visit codestin.com Credit goes to github.com
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 3bc76ee commit 080f49bCopy full SHA for 080f49b
driver/driver.go
@@ -2,7 +2,6 @@
2
package driver
3
4
import (
5
- "errors"
6
"fmt"
7
neturl "net/url" // alias to allow `url string` func signature in New
8
"reflect"
@@ -49,8 +48,7 @@ func New(url string) (Driver, error) {
49
48
blankDriver := reflect.New(reflect.TypeOf(driver)).Interface()
50
d, ok := blankDriver.(Driver)
51
if !ok {
52
- err := errors.New(fmt.Sprintf("Driver '%s' does not implement the Driver interface"))
53
- return nil, err
+ return nil, fmt.Errorf("Driver '%s' does not implement the Driver interface", u.Scheme)
54
}
55
verifyFilenameExtension(u.Scheme, d)
56
if err := d.Initialize(url); err != nil {
0 commit comments