Skip to content

Commit

Permalink
fix: staticcheck ST1005
Browse files Browse the repository at this point in the history
Resolves "error strings should not be capitalized (ST1005)" from `staticcheck`.

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam committed Oct 15, 2024
1 parent 0ea4d5d commit 4dbca2c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vmc/data_source_vmc_sddc.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func dataSourceVmcSddcRead(d *schema.ResourceData, m interface{}) error {
d.SetId("")
return nil
}
return fmt.Errorf("Error while getting the SDDC with ID %s,%v", sddcID, err)
return fmt.Errorf("error while getting the SDDC with ID %s,%v", sddcID, err)
}

if *sddc.SddcState == "DELETED" {
Expand Down
2 changes: 1 addition & 1 deletion vmc/resource_vmc_sddc.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ func resourceSddcUpdate(d *schema.ResourceData, m interface{}) error {

if d.HasChange("intranet_mtu_uplink") {
if d.Get("provider_type") == constants.ZeroCloudProviderType {
return fmt.Errorf("Intranet MTU uplink cannot be updated for %s provider type", constants.ZeroCloudProviderType)
return fmt.Errorf("intranet MTU uplink cannot be updated for %s provider type", constants.ZeroCloudProviderType)
}
intranetMTUUplink := d.Get("intranet_mtu_uplink").(int)
intranetMTUUplinkPointer := int64(intranetMTUUplink)
Expand Down
6 changes: 3 additions & 3 deletions vmc/sddcgroup/sddc_group_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (client *ClientImpl) GetSddcGroup(groupID string) (*DeploymentGroup,
return group, config, err
}
if statusCode == http.StatusNotFound {
return group, config, fmt.Errorf("No NetworkConnectivityConfig with ID: %s not found ", resourceID)
return group, config, fmt.Errorf("no NetworkConnectivityConfig with ID: %s not found ", resourceID)
}
if statusCode == http.StatusOK {
err := json.NewDecoder(bytes.NewReader(*rawResponse)).Decode(&config)
Expand Down Expand Up @@ -309,10 +309,10 @@ func (client *ClientImpl) executeRequest(
return nil, response.StatusCode, err
}
if response.StatusCode == http.StatusUnauthorized {
return nil, response.StatusCode, fmt.Errorf("Unauthenticated request ")
return nil, response.StatusCode, fmt.Errorf("unauthenticated request ")
}
if response.StatusCode == http.StatusForbidden {
return nil, response.StatusCode, fmt.Errorf("Unauthorized request ")
return nil, response.StatusCode, fmt.Errorf("unauthorized request ")
}
result, err := io.ReadAll(response.Body)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion vmc/task/task_v2_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (client *V2ClientImpl) GetTask(taskID string) (V2Task, error) {
return result, err
}
if statusCode == http.StatusNotFound {
return result, fmt.Errorf("Task with ID: %s not found ", taskID)
return result, fmt.Errorf("task with ID: %s not found ", taskID)
}
if statusCode == http.StatusOK {
err := json.NewDecoder(bytes.NewReader(*rawResponse)).Decode(&result)
Expand Down

0 comments on commit 4dbca2c

Please sign in to comment.