Skip to content

Fix error strings should not be capitalized #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/sync/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func validateAWSConfig(cfg *awsConfig) error {
}

if len(cfg.Upstreams) == 0 {
return fmt.Errorf("There are no upstreams found in the config file")
return fmt.Errorf("there are no upstreams found in the config file")
}

for _, ups := range cfg.Upstreams {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sync/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func validateAzureConfig(cfg *azureConfig) error {
}

if len(cfg.Upstreams) == 0 {
return fmt.Errorf("There are no upstreams found in the config file")
return fmt.Errorf("there are no upstreams found in the config file")
}

for _, ups := range cfg.Upstreams {
Expand Down
22 changes: 11 additions & 11 deletions cmd/sync/errormessages.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package main

const (
errorMsgFormat = "The mandatory field %v is either empty or missing in the config file"
intervalErrorMsg = "The mandatory field sync_interval_in_seconds is either 0 or missing in the config file"
cloudProviderErrorMsg = "The field cloud_provider has invalid value %v in the config file"
errorMsgFormat = "the mandatory field %v is either empty or missing in the config file"
intervalErrorMsg = "the mandatory field sync_interval_in_seconds is either 0 or missing in the config file"
cloudProviderErrorMsg = "the field cloud_provider has invalid value %v in the config file"
defaultCloudProvider = "AWS"
upstreamNameErrorMsg = "The mandatory field name is either empty or missing for an upstream in the config file"
upstreamErrorMsgFormat = "The mandatory field %v is either empty or missing for the upstream %v in the config file"
upstreamPortErrorMsgFormat = "The mandatory field port is either zero or missing for the upstream %v in the config file"
upstreamKindErrorMsgFormat = "The mandatory field kind is either not equal to http or tcp or missing for the upstream %v in the config file"
upstreamMaxConnsErrorMsgFmt = "The field max_conns has invalid value %v in the config file"
upstreamMaxFailsErrorMsgFmt = "The field max_fails has invalid value %v in the config file"
upstreamFailTimeoutErrorMsgFmt = "The field fail_timeout has invalid value %v in the config file"
upstreamSlowStartErrorMsgFmt = "The field slow_start has invalid value %v in the config file"
upstreamNameErrorMsg = "the mandatory field name is either empty or missing for an upstream in the config file"
upstreamErrorMsgFormat = "the mandatory field %v is either empty or missing for the upstream %v in the config file"
upstreamPortErrorMsgFormat = "the mandatory field port is either zero or missing for the upstream %v in the config file"
upstreamKindErrorMsgFormat = "the mandatory field kind is either not equal to http or tcp or missing for the upstream %v in the config file"
upstreamMaxConnsErrorMsgFmt = "the field max_conns has invalid value %v in the config file"
upstreamMaxFailsErrorMsgFmt = "the field max_fails has invalid value %v in the config file"
upstreamFailTimeoutErrorMsgFmt = "the field fail_timeout has invalid value %v in the config file"
upstreamSlowStartErrorMsgFmt = "the field slow_start has invalid value %v in the config file"
)