Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialize RPC input and output entries when augmented #250

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
}
Comment on lines +1351 to +1352
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind: InputEntry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
e = e.RPC.Input
case "output":
if e.RPC.Output == nil {
e.RPC.Output = &Entry{
Name: "output",
Kind: OutputEntry,
Dir: make(map[string]*Entry),
}
Comment on lines +1360 to +1361
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind: OutputEntry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
e = e.RPC.Output
}
default:
Expand Down