Fix issues found by go vet
This commit is contained in:
		
						commit
						f86275e60c
					
				|  | @ -248,7 +248,7 @@ func (c *Cluster) Create(stopCh <-chan struct{}) error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string) { | func (c *Cluster) sameServiceWith(service *v1.Service) (match bool, reason string) { | ||||||
| 	//TODO: improve comparison
 | 	//TODO: improve comparison
 | ||||||
| 	if !reflect.DeepEqual(c.Service.Spec.LoadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) { | 	if !reflect.DeepEqual(c.Service.Spec.LoadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) { | ||||||
| 		reason = "new service's LoadBalancerSourceRange doesn't match the current one" | 		reason = "new service's LoadBalancerSourceRange doesn't match the current one" | ||||||
|  | @ -258,7 +258,7 @@ func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string | ||||||
| 	return | 	return | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) { | func (c *Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) { | ||||||
| 	if !reflect.DeepEqual(c.Spec.Volume, volume) { | 	if !reflect.DeepEqual(c.Spec.Volume, volume) { | ||||||
| 		reason = "new volume's specification doesn't match the current one" | 		reason = "new volume's specification doesn't match the current one" | ||||||
| 	} else { | 	} else { | ||||||
|  | @ -267,7 +267,8 @@ func (c Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) | ||||||
| 	return | 	return | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) (match, needsReplace bool, needsRollUpdate bool, reason string) { | 
 | ||||||
|  | func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) (match, needsReplace, needsRollUpdate bool, reason string) { | ||||||
| 	match = true | 	match = true | ||||||
| 	//TODO: improve me
 | 	//TODO: improve me
 | ||||||
| 	if *c.Statefulset.Spec.Replicas != *statefulSet.Spec.Replicas { | 	if *c.Statefulset.Spec.Replicas != *statefulSet.Spec.Replicas { | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ func decoderFrom(field reflect.Value) (d Decoder) { | ||||||
| 
 | 
 | ||||||
| 	d, ok := field.Interface().(Decoder) | 	d, ok := field.Interface().(Decoder) | ||||||
| 	if !ok && field.CanAddr() { | 	if !ok && field.CanAddr() { | ||||||
| 		d, ok = field.Addr().Interface().(Decoder) | 		d, _ = field.Addr().Interface().(Decoder) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return d | 	return d | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue