Skip to content

Commit

Permalink
Merge pull request kubernetes#4086 from afbjorklund/ineffassign
Browse files Browse the repository at this point in the history
Fixed ignored error, noticed by ineffassign
  • Loading branch information
afbjorklund authored Apr 13, 2019
2 parents a66041b + fc35ab5 commit 3746fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/minikube/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func printURLsForService(c corev1.CoreV1Interface, ip, service, namespace string
e := c.Endpoints(namespace)
endpoints, err := e.Get(service, metav1.GetOptions{})
m := make(map[int32]string)
if endpoints != nil && len(endpoints.Subsets) > 0 {
if err == nil && endpoints != nil && len(endpoints.Subsets) > 0 {
for _, ept := range endpoints.Subsets {
for _, p := range ept.Ports {
m[int32(p.Port)] = p.Name
Expand Down

0 comments on commit 3746fb9

Please sign in to comment.