Skip to content

Commit

Permalink
initialize RPC input and output entries when augmented (#250)
Browse files Browse the repository at this point in the history
* initialize RPC input and output entries when augmented

* set kind field
  • Loading branch information
karimra authored Sep 21, 2023
1 parent 08bc968 commit 944052f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/yang/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -1344,8 +1344,22 @@ func (e *Entry) Find(name string) *Entry {
_, part = getPrefix(part)
switch part {
case "input":
if e.RPC.Input == nil {
e.RPC.Input = &Entry{
Name: "input",
Kind: InputEntry,
Dir: make(map[string]*Entry),
}
}
e = e.RPC.Input
case "output":
if e.RPC.Output == nil {
e.RPC.Output = &Entry{
Name: "output",
Kind: OutputEntry,
Dir: make(map[string]*Entry),
}
}
e = e.RPC.Output
}
default:
Expand Down

0 comments on commit 944052f

Please sign in to comment.