Skip to content

Commit

Permalink
fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabilov committed Oct 16, 2017
1 parent 0a69108 commit 2fa6b60
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 @@ -124,13 +124,13 @@ func (c *Cluster) createStatefulSet() (*v1beta1.StatefulSet, error) {
func getPodIndex(podName string) (int32, error) {
parts := strings.Split(podName, "-")
if len(parts) == 0 {
return 0, fmt.Errorf("no postfix")
return 0, fmt.Errorf("no pod index")
}

postfix := parts[len(parts)-1]
res, err := strconv.ParseInt(postfix, 10, 32)
if err != nil {
return 0, fmt.Errorf("couldn not parse postfix: %v", err)
return 0, fmt.Errorf("couldn not parse pod index: %v", err)
}

return int32(res), nil
Expand Down

0 comments on commit 2fa6b60

Please sign in to comment.