From ccb3c571c9d0572b06a0239b586ce193de5b2adc Mon Sep 17 00:00:00 2001 From: Ran Vaknin Date: Fri, 9 Sep 2022 12:59:36 -0700 Subject: [PATCH] fixed linter error --- feature/rds/auth/connect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/rds/auth/connect.go b/feature/rds/auth/connect.go index 80ad50a90a1..9a1406e7ed3 100644 --- a/feature/rds/auth/connect.go +++ b/feature/rds/auth/connect.go @@ -45,7 +45,7 @@ type BuildAuthTokenOptions struct{} // See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html // for more information on using IAM database authentication with RDS. func BuildAuthToken(ctx context.Context, endpoint, region, dbUser string, creds aws.CredentialsProvider, optFns ...func(options *BuildAuthTokenOptions)) (string, error) { - _, port := validateUrl(endpoint) + _, port := validateURL(endpoint) if port == "" { return "", fmt.Errorf("the provided endpoint is missing a port, or the provided port is invalid") } @@ -101,7 +101,7 @@ func BuildAuthToken(ctx context.Context, endpoint, region, dbUser string, creds return url, nil } -func validateUrl(hostPort string) (host, port string) { +func validateURL(hostPort string) (host, port string) { colon := strings.LastIndexByte(hostPort, ':') if colon != -1 { host, port = hostPort[:colon], hostPort[colon+1:]