Commit Graph

16 Commits

Author SHA1 Message Date
Mike Farah
0c15cf35a7 Added properties convert to numbers example #2023 2024-05-12 12:07:04 +10:00
Mike Farah
7a01e216c4 Refactoring Yaml encoder prefs 2024-02-24 15:36:16 +11:00
Mike Farah
f44d47a204 Refactoring Props encoder prefs 2024-02-24 15:14:21 +11:00
Mike Farah
9f3822fbaa Improving property docs 2024-02-20 13:45:31 +11:00
Mike Farah
b24b484efc Added --properties-array-brackets flag for properties encoder #1933 2024-02-20 11:39:56 +11:00
Ryan Drew
2865022cf8
Add --properties-separator option (#1951)
This commit adds the --properties-separator option, which lets users
specify the separator used between keys and values in the properties
output format. This is done by adjusting the value of
github.com/magiconair/properties#Properties.WriteSeparator at encode
time.

Some refactoring of the properties encoder unit tests was done to make
it easier to write unit tests that include different separator values.

Fixes: #1864

Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
2024-02-20 10:57:44 +11:00
Mike Farah
010750daf6 Updated to latest golint 2024-01-11 13:17:34 +11:00
Mike Farah
13d1bbb45f
Generic ast (#1829)
Remove dependency on yaml.Node for internal AST representation. Yaml decoder is now just another decoder.
2023-10-18 12:11:53 +11:00
Mike Farah
1b0a62d08d Handle scalars in property files 2023-03-27 13:51:08 +11:00
Mike Farah
bd5e5dc965 Array to map operator for #1415 2022-11-08 13:40:00 +11:00
Mike Farah
a0be871a9d Only maps can be encoded to XML #1408 2022-11-02 21:41:39 +11:00
Mike Farah
880397d549
Refactored decoder responsibilities (#1402)
- improved comment handling
- yaml decoder now responsible for leading content work around
2022-10-28 14:16:46 +11:00
Daniel Carbone
98b411f82e
adding support for --wrapScalar=false in properties encoder (#1241)
* adding support for --wrapScalar=false in properties encoder

* altering encoder and decoder tests somewhat

* adding .idea

* Revert "altering encoder and decoder tests somewhat"

This reverts commit e3655130e2.

* adding test scenario for encoding with wrapped scalars
2022-06-25 12:22:03 +10:00
Mike Farah
edbdb16ab7 Fixes auto expansion of properties #1127 2022-03-01 11:29:11 +11:00
Mike Farah
a9c3617b4f
Decoder Properties (#1099)
* Decoder Properties

* Added properties round trip test

* Fixed property decode for github actions

* Refactored XML test to use common functions

* Switched formatScenario parameter order for more readablity
2022-02-10 12:02:53 +11:00
Mike Farah
992fe066aa Improved property conversion docs 2022-02-01 15:34:17 +11:00