thomasfinstad / terraform-provider-vyos-rolling

Terraform provider for VyOS with a focus on automatic resource generation
6 stars 0 forks source link

improve interface definition generation #178

Closed github-actions[bot] closed 7 months ago

github-actions[bot] commented 7 months ago

look into using dst instead of regex replace

Rendered example: Parent:\<REC(&interfacedefinition.Node)>,

Rendered example: LeafNode:[]*interfacedefinition.LeafNode{\<REC()>}

https://github.com/thomasfinstad/terraform-provider-vyos/blob/0bdd3c9b9e98b4250b39a0785765f20bfd770120/tools/build-vyos-infterface-definition-structs/main.go#L53


    outputFormatted := []byte(output)

    // TODO improve interface definition generation
    //  look into using dst instead of regex replace

    // Change recursive attributes with nil as these can not be dumped as code
    // Rendered example: Parent:<REC(&interfacedefinition.Node)>,
    // Rendered example: LeafNode:[]*interfacedefinition.LeafNode{<REC()>}