Skip to content

Commit 1d8b0ff

Browse files
authored
Merge pull request #4 from hirose31/fast-startup
Decide default region by LANG
2 parents c8ebc09 + 7b9ebff commit 1d8b0ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/m/s3.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ func NewS3Model() *S3Model {
4141
s3m := S3Model{}
4242

4343
// client
44-
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-east-1"))
44+
region := "us-east-1"
45+
if strings.HasPrefix(os.Getenv("LANG"), "ja") {
46+
region = "ap-northeast-1"
47+
}
48+
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion(region))
4549
if err != nil {
4650
panic(err)
4751
}

0 commit comments

Comments
 (0)