Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
do not panic in Open, return error
  • Loading branch information
johejo committed Nov 18, 2020
commit 02da3b65068d842fe0da714547ff7a66fe966854
4 changes: 2 additions & 2 deletions source/iofs/iofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ func New(fsys fs.FS, path string) (source.Driver, error) {
}

// Open is part of source.Driver interface implementation.
// Open panics when called directly.
// Open cannot be called on the iofs passthrough driver.
func (d *driver) Open(url string) (source.Driver, error) {
panic("iofs: driver does not support open with url")
return nil, errors.New("Open() cannot be called on the iofs passthrough driver")
}

// PartialDriver is a helper service for creating new source drivers working with
Expand Down