Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BuildS3Config public #3132

Merged
merged 2 commits into from
Apr 1, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/config-host-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ func probeS3Signature(accessKey, secretKey, url string) (string, *probe.Error) {
return s3Config.Signature, nil
}

// buildS3Config constructs an S3 Config and does
// BuildS3Config constructs an S3 Config and does
// signature auto-probe when needed.
func buildS3Config(url, accessKey, secretKey, api, lookup string) (*Config, *probe.Error) {
func BuildS3Config(url, accessKey, secretKey, api, lookup string) (*Config, *probe.Error) {

s3Config := newS3Config(url, &hostConfigV9{
AccessKey: accessKey,
Expand Down Expand Up @@ -278,7 +278,7 @@ func mainConfigHostAdd(ctx *cli.Context) error {
accessKey, secretKey := fetchHostKeys(args)
checkConfigHostAddSyntax(ctx, accessKey, secretKey)

s3Config, err := buildS3Config(url, accessKey, secretKey, api, lookup)
s3Config, err := BuildS3Config(url, accessKey, secretKey, api, lookup)
fatalIf(err.Trace(ctx.Args()...), "Unable to initialize new config from the provided credentials.")

addHost(ctx.Args().Get(0), hostConfigV9{
Expand Down