mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #110916 from zhoumingcheng/master-code-v1
Correct wrong syntax
This commit is contained in:
commit
49738aaf17
@ -145,7 +145,7 @@ func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrS
|
|||||||
// GetScaledValueFromIntOrPercent is meant to replace GetValueFromIntOrPercent.
|
// GetScaledValueFromIntOrPercent is meant to replace GetValueFromIntOrPercent.
|
||||||
// This method returns a scaled value from an IntOrString type. If the IntOrString
|
// This method returns a scaled value from an IntOrString type. If the IntOrString
|
||||||
// is a percentage string value it's treated as a percentage and scaled appropriately
|
// is a percentage string value it's treated as a percentage and scaled appropriately
|
||||||
// in accordance to the total, if it's an int value it's treated as a a simple value and
|
// in accordance to the total, if it's an int value it's treated as a simple value and
|
||||||
// if it is a string value which is either non-numeric or numeric but lacking a trailing '%' it returns an error.
|
// if it is a string value which is either non-numeric or numeric but lacking a trailing '%' it returns an error.
|
||||||
func GetScaledValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) {
|
func GetScaledValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) {
|
||||||
if intOrPercent == nil {
|
if intOrPercent == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user