feat: Make CapabilitySet public #111
No reviewers
Labels
No labels
breaking-change
bug
dependencies
duplicate
enhancement
go
good first issue
help wanted
invalid
investigation
proposal
proposal-accepted
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nemith/netconf!111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "brb/push-wvtwrkwqypsq"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CapabilitySet was a unexported before with the public api being a
[]string. This exports it and has the session return theCapabilitySetinstead of[]stringexposing theHas()method .Right now this is a completely frozen/readonly interface which feels right.
Pull request overview
This PR makes the
CapabilitySettype public to provide a more ergonomic API for working with NETCONF capabilities. Instead of returning raw[]stringslices, the session now returns*CapabilitySetwhich provides useful methods likeHas()for capability checking.CapabilitySettype with read-only methods (Has(),Len(),All())ClientCapabilities()/ServerCapabilities()toClientCaps()/ServerCaps()and changes return type to*CapabilitySetCapNetConfig10andCapNetConfig11for common base capabilitiesReviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@ -1,19 +1,24 @@package netconfThe constant names use "NetConfig" but the actual URN contains "netconf" (short for "Network Configuration"). Consider renaming to CapNetConf10 and CapNetConf11 to better match the actual capability string.
Grammatical error in the comment. Should be "its" instead of "it's" (possessive form, not contraction).