Skip to content

Commit

Permalink
use better name for the method
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabilov committed Oct 16, 2017
1 parent 853aa17 commit 0a69108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (c *Cluster) createStatefulSet() (*v1beta1.StatefulSet, error) {
return statefulSet, nil
}

func getPodNumb(podName string) (int32, error) {
func getPodIndex(podName string) (int32, error) {
parts := strings.Split(podName, "-")
if len(parts) == 0 {
return 0, fmt.Errorf("no postfix")
Expand All @@ -142,7 +142,7 @@ func (c *Cluster) preScaleDown(newStatefulSet *v1beta1.StatefulSet) error {
return fmt.Errorf("could not get master pod: %v", err)
}

podNum, err := getPodNumb(masterPod[0].Name)
podNum, err := getPodIndex(masterPod[0].Name)
if err != nil {
return fmt.Errorf("could not get pod number: %v", err)
}
Expand Down

0 comments on commit 0a69108

Please sign in to comment.