refactor(s3): read S3 secrets through app config
This commit is contained in:
@@ -4,11 +4,15 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"mtusi2026-messenger/internal/config"
|
||||
"mtusi2026-messenger/internal/s3"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := s3.WriteConfig("/config/s3.json"); err != nil {
|
||||
cfg := config.LoadS3()
|
||||
|
||||
err := s3.WriteConfig("/config/s3.json", cfg)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "s3config:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user