add context to OpenFile
parent
28ea0de82e
commit
70576793d9
|
@ -1,6 +1,7 @@
|
||||||
package file
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -37,7 +38,7 @@ type Listing struct {
|
||||||
func GetListing(u *config.User, filePath string, baseURL string) (*Listing, error) {
|
func GetListing(u *config.User, filePath string, baseURL string) (*Listing, error) {
|
||||||
// Gets the directory information using the Virtual File System of
|
// Gets the directory information using the Virtual File System of
|
||||||
// the user configuration.
|
// the user configuration.
|
||||||
file, err := u.FileSystem.OpenFile(filePath, os.O_RDONLY, 0)
|
file, err := u.FileSystem.OpenFile(context.TODO(), filePath, os.O_RDONLY, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue