Skip to content

Commit fa12c68

Browse files
committed
change max,min
Signed-off-by: Tomasz Janiszewski <[email protected]>
1 parent 6db04a2 commit fa12c68

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/templates/updateconfig/template.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ func parseIntOrString(data string) (*intstr.IntOrString, error) {
4949

5050
}
5151

52-
func compareIntOrString(max, min, actual *intstr.IntOrString) bool {
53-
if max == nil && min == nil {
52+
func compareIntOrString(maximal, minimal, actual *intstr.IntOrString) bool {
53+
if maximal == nil && minimal == nil {
5454
return true
5555
}
5656
if actual == nil {
@@ -61,25 +61,25 @@ func compareIntOrString(max, min, actual *intstr.IntOrString) bool {
6161
return false
6262
}
6363
actualIsPercent := strings.Contains(actual.String(), "%")
64-
if max != nil {
65-
maxIsPercent := strings.Contains(max.String(), "%")
64+
if maximal != nil {
65+
maxIsPercent := strings.Contains(maximal.String(), "%")
6666
if actualIsPercent != maxIsPercent {
6767
return false
6868
}
69-
maxVal, err := intstr.GetValueFromIntOrPercent(max, 100, false)
69+
maxVal, err := intstr.GetValueFromIntOrPercent(maximal, 100, false)
7070
if err != nil {
7171
return false
7272
}
7373
if actualVal > maxVal {
7474
return false
7575
}
7676
}
77-
if min != nil {
78-
minIsPercent := strings.Contains(min.String(), "%")
77+
if minimal != nil {
78+
minIsPercent := strings.Contains(minimal.String(), "%")
7979
if actualIsPercent != minIsPercent {
8080
return false
8181
}
82-
minVal, err := intstr.GetValueFromIntOrPercent(min, 100, false)
82+
minVal, err := intstr.GetValueFromIntOrPercent(minimal, 100, false)
8383
if err != nil {
8484
return false
8585
}

0 commit comments

Comments
 (0)