ygot
ygot copied to clipboard
Generate Name() method for all GoStructs
This would be akin to the Node.NName() function in goyang.
This is useful when GetNode
/SetNode
functions are called and the schema needs to be retrieved via oc.SchemaTree["<name of GoStruct>"]
Thanks to @dan-lepage for the feedback.
Will this ever differ from Reflect.TypeOf(struct).Name()
? If not, this could also be a single ygot function, e.g. ygot.TypeName(g GoStruct)
.
Thanks Dan, that's what I'll do.
I'd like to add this after the util
packages are split. This will go to the gostruct
package.