...
1 package httpfs
2
3 import (
4 "errors"
5 "net/http"
6
7 "github.com/golang-migrate/migrate/v4/source"
8 )
9
10
11
12
13 type driver struct {
14 PartialDriver
15 }
16
17
18
19 func New(fs http.FileSystem, path string) (source.Driver, error) {
20 var d driver
21 if err := d.Init(fs, path); err != nil {
22 return nil, err
23 }
24 return &d, nil
25 }
26
27
28
29 func (d *driver) Open(url string) (source.Driver, error) {
30 return nil, errors.New("Open() cannot be called on the httpfs passthrough driver")
31 }
32
View as plain text