Merge pull request #9673 from glours/fix-linter-unused-arg-issue-build

remove unused sessionConfig param for addSecretsConfig function
This commit is contained in:
Guillaume Lours 2022-07-22 17:53:51 +02:00 committed by GitHub
commit dcf086c3c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ func (s *composeService) Build(ctx context.Context, project *types.Project, opti
func (s *composeService) build(ctx context.Context, project *types.Project, options api.BuildOptions) error {
opts := map[string]build.Options{}
imagesToBuild := []string{}
var imagesToBuild []string
args := flatten(options.Args.Resolve(func(s string) (string, bool) {
s, ok := project.Environment[s]
@ -174,7 +174,7 @@ func (s *composeService) getBuildOptions(project *types.Project, images map[stri
}
func (s *composeService) getLocalImagesDigests(ctx context.Context, project *types.Project) (map[string]string, error) {
imageNames := []string{}
var imageNames []string
for _, s := range project.Services {
imgName := getImageName(s, project.Name)
if !utils.StringContains(imageNames, imgName) {
@ -257,7 +257,7 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
}
if len(service.Build.Secrets) > 0 {
secretsProvider, err := addSecretsConfig(project, service, sessionConfig)
secretsProvider, err := addSecretsConfig(project, service)
if err != nil {
return build.Options{}, err
}
@ -331,7 +331,7 @@ func sshAgentProvider(sshKeys types.SSHConfig) (session.Attachable, error) {
return sshprovider.NewSSHAgentProvider(sshConfig)
}
func addSecretsConfig(project *types.Project, service types.ServiceConfig, sessionConfig []session.Attachable) (session.Attachable, error) {
func addSecretsConfig(project *types.Project, service types.ServiceConfig) (session.Attachable, error) {
var sources []secretsprovider.Source
for _, secret := range service.Build.Secrets {