慕莱坞森
您可以使用以下命令轻松完成此操作:const defaultRegion = "us-east-1"staticResolver := aws.EndpointResolverFunc(func(service, region string) (aws.Endpoint, error) { return aws.Endpoint{ PartitionID: "aws", URL: "http://localhost:9123", // or where ever you ran minio SigningRegion: defaultRegion, HostnameImmutable: true, }, nil})cfg = aws.Config{ Region: defaultRegion, Credentials: credentials.NewStaticCredentialsProvider("minioadmin", "minioadmin", ""), EndpointResolver: staticResolver,}s3Client := s3.NewFromConfig(cfg)