Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws
: clarify Config.Endpoint behavior on empty strings (#3423)
The following PR changed the Endpoint behavior to include falling back to the default generated endpoint if an empty string is set. #3349 It's not very clear that this is the intended behavior when reading the docs. Adding this clarification promotes using the following code rather than have to conditionally check if it's set or not. For example: ```go // ideal behavior sess, err := session.NewSession(&aws.Config{ Endpoint: aws.String(s3Cfg.Endpoint), Region: aws.String(s3Cfg.Region), }) // required check given docs assumption var endpoint *string if s3Cfg.Endpoint != "" { endpoint = aws.String(s3Cfg.Endpoint) } sess, err := session.NewSession(&aws.Config{ Endpoint: endpoint, Region: aws.String(s3Cfg.Region), }) ```
- Loading branch information