Skip to content

Commit

Permalink
✨ feat: object storage enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lwnmengjing committed Apr 3, 2024
1 parent 7a15db0 commit eca5dcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/config/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ func (o *Storage) Init() {

if o.Region == "" || o.AccessKeyID == "" || o.SecretAccessKey == "" {
//use default config
cfg, err := config.LoadDefaultConfig(context.TODO())
opts := make([]func(*config.LoadOptions) error, 0)
if o.Region != "" {
opts = append(opts, config.WithRegion(o.Region))
}
cfg, err := config.LoadDefaultConfig(context.TODO(), opts...)
if err != nil {
log.Fatalf("failed to load SDK configuration, %v", err)
}
Expand Down

0 comments on commit eca5dcf

Please sign in to comment.