container: ability to set AuthFilePath for Resolver
Add a new field `AuthFilePath` and if it is not the empty string, it will be forwaded that information to `Client`.
This commit is contained in:
parent
2c0594629f
commit
c2f3f76d96
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ type Resolver struct {
|
|||
|
||||
ctx context.Context
|
||||
|
||||
Arch string
|
||||
Arch string
|
||||
AuthFilePath string
|
||||
}
|
||||
|
||||
func NewResolver(arch string) Resolver {
|
||||
|
|
@ -39,6 +40,9 @@ func (r *Resolver) Add(source, name string, TLSVerify *bool) {
|
|||
|
||||
client.SetTLSVerify(TLSVerify)
|
||||
client.SetArchitectureChoice(r.Arch)
|
||||
if r.AuthFilePath != "" {
|
||||
client.SetAuthFilePath(r.AuthFilePath)
|
||||
}
|
||||
|
||||
go func() {
|
||||
spec, err := client.Resolve(r.ctx, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue