Skip to content

Commit

Permalink
Update ks.go
Browse files Browse the repository at this point in the history
Fix formatting.
  • Loading branch information
alphabet5 committed May 3, 2022
1 parent 8c4752f commit 7239668
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ks.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ func main() {
if err != nil {
log.Fatalf("Unmarshal: %v", err)
}

outputValues := make(map[string]interface{})
outputYamlFile, err := ioutil.ReadFile(*o)
if err != nil {
log.Printf("outputYamlFile.Get err #%v ", err)
}
cm := yaml.CommentMap{}
cm := yaml.CommentMap{}
err = yaml.UnmarshalWithOptions(outputYamlFile, &outputValues, yaml.CommentToMap(cm))
if err != nil {
log.Fatalf("Unmarshal: %v", err)
Expand All @@ -116,8 +116,8 @@ func main() {
}
outputValues = dotNotationReplace(outputValues, strings.Split(path, "."), string(stdout))
}
output, err := yaml.MarshalWithOptions(outputValues, yaml.WithComment(cm), yaml.UseLiteralStyleIfMultiline(true))
//output, err := yaml.Marshal(outputValues)
output, err := yaml.MarshalWithOptions(outputValues, yaml.WithComment(cm), yaml.UseLiteralStyleIfMultiline(true))

if err != nil {
log.Fatalf("Marshal: %v", err)
}
Expand Down

0 comments on commit 7239668

Please sign in to comment.