@@ -42,7 +42,7 @@ type Opt struct {
4242 CacheAccessor cache.Accessor
4343}
4444
45- type gitSource struct {
45+ type Source struct {
4646 cache cache.Accessor
4747 locker * locker.Locker
4848}
@@ -55,19 +55,19 @@ func Supported() error {
5555 return nil
5656}
5757
58- func NewSource (opt Opt ) (source. Source , error ) {
59- gs := & gitSource {
58+ func NewSource (opt Opt ) (* Source , error ) {
59+ gs := & Source {
6060 cache : opt .CacheAccessor ,
6161 locker : locker .New (),
6262 }
6363 return gs , nil
6464}
6565
66- func (gs * gitSource ) Schemes () []string {
66+ func (gs * Source ) Schemes () []string {
6767 return []string {srctypes .GitScheme }
6868}
6969
70- func (gs * gitSource ) Identifier (scheme , ref string , attrs map [string ]string , platform * pb.Platform ) (source.Identifier , error ) {
70+ func (gs * Source ) Identifier (scheme , ref string , attrs map [string ]string , platform * pb.Platform ) (source.Identifier , error ) {
7171 id , err := NewGitIdentifier (ref )
7272 if err != nil {
7373 return nil , err
@@ -105,7 +105,7 @@ func (gs *gitSource) Identifier(scheme, ref string, attrs map[string]string, pla
105105}
106106
107107// needs to be called with repo lock
108- func (gs * gitSource ) mountRemote (ctx context.Context , remote string , authArgs []string , sha256 bool , reset bool , g session.Group ) (target string , release func () error , retErr error ) {
108+ func (gs * Source ) mountRemote (ctx context.Context , remote string , authArgs []string , sha256 bool , reset bool , g session.Group ) (target string , release func () error , retErr error ) {
109109 sis , err := searchGitRemote (ctx , gs .cache , remote )
110110 if err != nil {
111111 return "" , nil , errors .Wrapf (err , "failed to search metadata for %s" , urlutil .RedactCredentials (remote ))
@@ -205,7 +205,7 @@ func (gs *gitSource) mountRemote(ctx context.Context, remote string, authArgs []
205205}
206206
207207type gitSourceHandler struct {
208- * gitSource
208+ * Source
209209 src GitIdentifier
210210 cacheKey string
211211 cacheCommit string
@@ -231,16 +231,16 @@ func (gs *gitSourceHandler) shaToCacheKey(sha, ref string) string {
231231 return key
232232}
233233
234- func (gs * gitSource ) Resolve (ctx context.Context , id source.Identifier , sm * session.Manager , _ solver.Vertex ) (source.SourceInstance , error ) {
234+ func (gs * Source ) Resolve (ctx context.Context , id source.Identifier , sm * session.Manager , _ solver.Vertex ) (source.SourceInstance , error ) {
235235 gitIdentifier , ok := id .(* GitIdentifier )
236236 if ! ok {
237237 return nil , errors .Errorf ("invalid git identifier %v" , id )
238238 }
239239
240240 return & gitSourceHandler {
241- src : * gitIdentifier ,
242- gitSource : gs ,
243- sm : sm ,
241+ src : * gitIdentifier ,
242+ Source : gs ,
243+ sm : sm ,
244244 }, nil
245245}
246246
0 commit comments