Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 1c4bd45

Browse files
authored
Merge pull request #437 from cdrage/fix-floating-environment-issue
Allows the use of float values in environment variables
2 parents 5cba167 + 3839205 commit 1c4bd45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

yaml/types_yaml.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ func toSepMapParts(value map[interface{}]interface{}, sep string) ([]string, err
217217
parts = append(parts, sk+sep+strconv.Itoa(sv))
218218
} else if sv, ok := v.(int64); ok {
219219
parts = append(parts, sk+sep+strconv.FormatInt(sv, 10))
220+
} else if sv, ok := v.(float64); ok {
221+
parts = append(parts, sk+sep+strconv.FormatFloat(sv, 'f', -1, 64))
220222
} else if v == nil {
221223
parts = append(parts, sk)
222224
} else {

0 commit comments

Comments
 (0)