Skip to content

Commit

Permalink
fix: parse logic was not correct for --set
Browse files Browse the repository at this point in the history
The order was right, but the condition was not correct.
  • Loading branch information
micovery committed Apr 14, 2024
1 parent 6dd8fbd commit 3ec6468
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/values/any_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,19 @@ func (v *AnyMap) Set(entry string) error {
}

func ParseValue(value string) any {

intValue, err := strconv.ParseInt(value, 10, 64)
if err != nil {
if err == nil {
return intValue
}

floatValue, err := strconv.ParseFloat(value, 10)
if err != nil {
if err == nil {
return floatValue
}

boolValue, err := strconv.ParseBool(value)
if err != nil {
if err == nil {
return boolValue
}

Expand Down

0 comments on commit 3ec6468

Please # to comment.