Skip to content

Commit

Permalink
Manually fix the lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyu74 committed Sep 30, 2024
1 parent 5a7944e commit ed5f4f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/healthcheck/check_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func CheckProxyConnectivity(client HTTPClient) (string, error) {
if proxyURL == nil || *proxyURL == "" {
errMsg := "no proxy URL configured in backplane configuration"
logger.Warn(errMsg)
return "", fmt.Errorf(errMsg)
return "", fmt.Errorf("%s", errMsg)
}

logger.Infof("Getting the working proxy URL ['%s'] from local backplane configuration.", *proxyURL)
Expand Down Expand Up @@ -53,8 +53,8 @@ func CheckProxyConnectivity(client HTTPClient) (string, error) {
logger.Infof("Testing connectivity to the pre-defined test endpoint ['%s'] with the proxy.", proxyTestEndpoint)
if err := testEndPointConnectivity(proxyTestEndpoint, httpClientWithProxy); err != nil {
errMsg := fmt.Sprintf("Failed to access target endpoint ['%s'] with the proxy: %v", proxyTestEndpoint, err)
logger.Errorf(errMsg)
return "", fmt.Errorf(errMsg)
logger.Errorf("%s", errMsg)
return "", fmt.Errorf("%s", errMsg)
}

logger.Debugf("Successfully connected to proxy test endpoint: %s", proxyTestEndpoint)
Expand All @@ -70,7 +70,7 @@ func GetProxyTestEndpoint() (string, error) {
if bpConfig.ProxyCheckEndpoint == "" {
errMsg := "proxy test endpoint not configured"
logger.Warn(errMsg)
return "", fmt.Errorf(errMsg)
return "", fmt.Errorf("%s", errMsg)
}
return bpConfig.ProxyCheckEndpoint, nil
}
2 changes: 1 addition & 1 deletion pkg/healthcheck/check_vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func CheckVPNConnectivity(netInterfaces NetworkInterface, client HTTPClient) err
}
if err := testEndPointConnectivity(vpnCheckEndpoint, client); err != nil {
errMsg := fmt.Sprintf("Failed to access internal URL %s: %v", vpnCheckEndpoint, err)
logger.Errorf(errMsg)
logger.Errorf("%s", errMsg)
return fmt.Errorf(errMsg)
}

Expand Down

0 comments on commit ed5f4f0

Please sign in to comment.