Closed kentokento closed 4 months ago
I want to use config.LoadOptionsFunc as below
// var opts []func(*config.LoadOptions) error var opts []config.LoadOptionsFunc // now this will result in an error if c.AccessKey != "" && c.SecretKey != "" { opts = append(opts, config.WithCredentialsProvider( &credentials.StaticCredentialsProvider{ Value: aws.Credentials{ AccessKeyID: c.AccessKey, SecretAccessKey: c.SecretKey, }, }, )) } if c.Profile != "" { opts = append(opts, config.WithSharedConfigProfile(c.Profile)) } if c.Filename != "" { opts = append(opts, config.WithSharedConfigFiles([]string{c.Filename})) } return config.LoadDefaultConfig(context.TODO(), opts...)
We can't do this, it's an API break. See previous discussion in #2193.
I want to use config.LoadOptionsFunc as below