ygot
ygot (YANG Go Tools) is a Go toolkit that generates Go structs and enums from YANG modules, validates populated structs against the YANG schema, and renders them to JSON or gNMI notifications for streaming telemetry.
ygot generates a set of Go structures and enumerated values from a set of YANG modules through its generator binary, built on the ygen library, along with associated helper methods. The ytypes package validates the contents of those generated structures against constraints defined in the YANG schema, such as ranges and regular expressions, and the ygot package itself renders populated structures to JSON or to a set of gNMI notifications for use in streaming telemetry.
While designed to work with any YANG module, ygot can additionally transform the schema for OpenConfig modules that follow the OpenConfig style guide, optimizing the data structures it produces for configuration use; an OpenConfig linter can verify a model conforms to those style requirements. A demo walks through generating and using code for the openconfig-interfaces module, and the project tracks support for the two most recent Go releases. It is explicitly not an official Google product.