From aed56095edaed105a40aef6bfca2a0d89b8e320e Mon Sep 17 00:00:00 2001 From: Johan Nemitz Date: Wed, 2 Mar 2022 16:45:55 -0800 Subject: [PATCH] Fix problem where a Choice statement contains Choice statements (yang 1.1) and Issue #75 (augments in Uses) Signed-off-by: Johan Nemitz --- pkg/yang/yang.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkg/yang/yang.go b/pkg/yang/yang.go index 4f62801..3bf816a 100644 --- a/pkg/yang/yang.go +++ b/pkg/yang/yang.go @@ -487,6 +487,7 @@ type Choice struct { Anydata []*AnyData `yang:"anydata"` Anyxml []*AnyXML `yang:"anyxml"` Case []*Case `yang:"case"` + Choice []*Choice `yang:"choice"` Config *Value `yang:"config"` Container []*Container `yang:"container"` Default *Value `yang:"default"` @@ -624,13 +625,13 @@ type Uses struct { Parent Node `yang:"Parent,nomerge" json:"-"` Extensions []*Statement `yang:"Ext" json:"-"` - Augment *Augment `yang:"augment" json:",omitempty"` - Description *Value `yang:"description" json:",omitempty"` - IfFeature []*Value `yang:"if-feature" json:"-"` - Refine []*Refine `yang:"refine" json:"-"` - Reference *Value `yang:"reference" json:"-"` - Status *Value `yang:"status" json:"-"` - When *Value `yang:"when" json:",omitempty"` + Augment []*Augment `yang:"augment" json:",omitempty"` + Description *Value `yang:"description" json:",omitempty"` + IfFeature []*Value `yang:"if-feature" json:"-"` + Refine []*Refine `yang:"refine" json:"-"` + Reference *Value `yang:"reference" json:"-"` + Status *Value `yang:"status" json:"-"` + When *Value `yang:"when" json:",omitempty"` } func (Uses) Kind() string { return "uses" }