Skip to content

[Question] Is it possible to merge 2 yamls preserving anchors? #381

Open
@rjshrjndrn

Description

@rjshrjndrn

Hi,

First of all, thank you for this amazing library. I'm checking a way to merge 2 yamls, and keep the anchors intact. Is there any way to do that. Sorry for this stupid question. I'm a noob in golang.

Thank you

yaml1

people: &people
  - name: john
    age: 10
class:
  students: *people

yaml2

people:
  - name: alice
    age: 11

output.yaml

people: &people
  - name: john
    age: 10
  - name: alice
    age: 11
class:
  students: *people

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions