@@ -2,6 +2,7 @@ package core
2
2
3
3
import (
4
4
"bytes"
5
+ "context"
5
6
"io"
6
7
"mime"
7
8
"net/http"
@@ -28,7 +29,7 @@ func NewDummy() (*ProviderDummy, error) {
28
29
}, nil
29
30
}
30
31
31
- func (p * ProviderDummy ) Repos (owner string ) (map [string ]string , error ) {
32
+ func (p * ProviderDummy ) Repos (ctx context. Context , owner string ) (map [string ]string , error ) {
32
33
dir , err := os .ReadDir (filepath .Join (p .BaseDir , owner ))
33
34
if err != nil {
34
35
return nil , err
@@ -42,7 +43,7 @@ func (p *ProviderDummy) Repos(owner string) (map[string]string, error) {
42
43
return repos , nil
43
44
}
44
45
45
- func (p * ProviderDummy ) Branches (owner , repo string ) (map [string ]* core.BranchInfo , error ) {
46
+ func (p * ProviderDummy ) Branches (ctx context. Context , owner , repo string ) (map [string ]* core.BranchInfo , error ) {
46
47
dir , err := os .ReadDir (filepath .Join (p .BaseDir , owner , repo ))
47
48
if err != nil {
48
49
return nil , err
@@ -59,7 +60,7 @@ func (p *ProviderDummy) Branches(owner, repo string) (map[string]*core.BranchInf
59
60
return branches , nil
60
61
}
61
62
62
- func (p * ProviderDummy ) Open (_ * http.Client , owner , repo , commit , path string , _ http.Header ) (* http.Response , error ) {
63
+ func (p * ProviderDummy ) Open (ctx context. Context , _ * http.Client , owner , repo , commit , path string , _ http.Header ) (* http.Response , error ) {
63
64
open , err := os .Open (filepath .Join (p .BaseDir , owner , repo , commit , path ))
64
65
if err != nil {
65
66
return nil , err
0 commit comments