Refactoring Props encoder prefs

This commit is contained in:
Mike Farah
2024-02-24 15:14:21 +11:00
parent 2866e90c49
commit f44d47a204
6 changed files with 36 additions and 18 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func yamlToProps(sampleYaml string, unwrapScalar bool, separator string) string
var output bytes.Buffer
writer := bufio.NewWriter(&output)
var propsEncoder = NewPropertiesEncoder(unwrapScalar, PropertiesPreferences{KeyValueSeparator: separator})
var propsEncoder = NewPropertiesEncoder(PropertiesPreferences{KeyValueSeparator: separator, UnwrapScalar: unwrapScalar})
inputs, err := readDocuments(strings.NewReader(sampleYaml), "sample.yml", 0, NewYamlDecoder(ConfiguredYamlPreferences))
if err != nil {
panic(err)