Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openconfig/goyang
YANG parser and compiler to produce Go language objects
https://github.com/openconfig/goyang
Last synced: 1 day ago
JSON representation
YANG parser and compiler to produce Go language objects
- Host: GitHub
- URL: https://github.com/openconfig/goyang
- Owner: openconfig
- License: apache-2.0
- Created: 2015-06-02T15:57:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-12-16T04:01:11.000Z (20 days ago)
- Last Synced: 2024-12-28T01:03:46.761Z (8 days ago)
- Language: Go
- Size: 758 KB
- Stars: 221
- Watchers: 33
- Forks: 85
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
![Go](https://github.com/openconfig/goyang/workflows/Go/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/openconfig/goyang/badge.svg?branch=master)](https://coveralls.io/github/openconfig/goyang?branch=master)Current support for `goyang` is for the [latest 3 Go releases](https://golang.org/project/#release).
# goyang
YANG parser and compiler for Go programs.The yang package (pkg/yang) is used to convert a YANG schema into either an
in memory abstract syntax trees (ast) or more fully resolved, in memory, "Entry"
trees. An Entry tree consists only of Entry structures and has had
augmentation, imports, and includes all applied.goyang is a sample program that uses the yang (pkg/yang) package.
goyang uses the yang package to create an in-memory tree representation of
schemas defined in YANG and then dumps out the contents in several forms.
The forms include:* tree - a simple tree representation
* types - list understood types extracted from the schemaThe yang package, and the goyang program, are not complete and are a work in
progress.For more complex output types, such as Go structs, and protobuf messages
please use the [openconfig/ygot](https://github.com/openconfig/ygot) package,
which uses this package as its backend.### Getting started
To build goyang, ensure you have go language tools installed
(available at [golang.org](https://golang.org/dl)) and that the `GOPATH`
environment variable is set to your Go workspace.1. `go get github.com/openconfig/goyang`
* This will download goyang code and dependencies into the src
subdirectory in your workspace.2. `cd /src/github.com/openconfig/goyang`
3. `go build`
* This will build the goyang binary and place it in the bin
subdirectory in your workspace.### Contributing to goyang
goyang is still a work-in-progress and we welcome contributions. Please see
the `CONTRIBUTING` file for information about how to contribute to the codebase.### Disclaimer
This is not an official Google product.