mirror of
https://github.com/mariadb-operator/mariadb-operator.git
synced 2025-08-16 14:57:09 +00:00
fix staticcheck ST1005 issues (follow error msg rules)
This commit is contained in:
@ -148,7 +148,7 @@ func (r *EndpointsReconciler) endpointSlice(ctx context.Context, key types.Names
|
||||
|
||||
func buildEndpoint(pod *corev1.Pod) (*discoveryv1.Endpoint, error) {
|
||||
if pod.Status.PodIP == "" || pod.Spec.NodeName == "" {
|
||||
return nil, errors.New("Pod IP and Nodename must be set")
|
||||
return nil, errors.New("Pod IP and NodeName must be set") //nolint:staticcheck
|
||||
}
|
||||
return &discoveryv1.Endpoint{
|
||||
Addresses: []string{pod.Status.PodIP},
|
||||
@ -167,7 +167,7 @@ func buildEndpoint(pod *corev1.Pod) (*discoveryv1.Endpoint, error) {
|
||||
|
||||
func getAddressType(pod *corev1.Pod) (*discoveryv1.AddressType, error) {
|
||||
if pod.Status.PodIP == "" {
|
||||
return nil, errors.New("Pod IP and Nodename must be set")
|
||||
return nil, errors.New("Pod IP and NodeName must be set") //nolint:staticcheck
|
||||
}
|
||||
parsedIp := net.ParseIP(pod.Status.PodIP)
|
||||
if parsedIp == nil {
|
||||
|
Reference in New Issue
Block a user