-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature request: Improve reflection support #40
Comments
Lists are hard, but I think if everything lined up, reflection would handle
that, but i am not sure. I have found that reflection really is one of
the most important parts and I am committed to any motion to improve it.
There was a contribution for registering for field base types that might
help you
https://freeconf.org/docs/examples/node-reflect/#field-coersion
…On Sat, Jul 22, 2023 at 2:32 PM Roberto Fronteddu ***@***.***> wrote:
I am no expert on reflection in go but I was wondering if you had any plan
to support reflection for base types such as the example that follows. I
was surprised to have to use a custom parser (albeit a simple one) to parse
a list of string and integers.
list bar {
key foo;
leaf foo {
type int32 {
range "0..120";
}
}
leaf baz {
type string;
}
}
—
Reply to this email directly, view it on GitHub
<#40>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACA7VRJGTQ7ZBZHHI2NW3XRQMD5ANCNFSM6AAAAAA2T7R73Y>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I will be studying reflection in Golang soon. If I have some time I will try to cook something. |
Help would be appreciated, even if it is just reporting github issues like:
This would work:
{insert YANG here}
from:
{insert go code here}
Go reflection is tricky, but the bigger challenge by far is all the
variations that are inherent with trying to coerce data from code to a
fixed schema. In addition, I've used a lot of serializers that are messy
and confusing and this is an area I'll have a lot of opinions on.
…On Sat, Jul 22, 2023 at 9:57 PM Roberto Fronteddu ***@***.***> wrote:
I will be studying reflection in Golang soon. If I have some time I will
try to cook something.
—
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACA7WF5ROZTOPQOYWAABDXRSAJFANCNFSM6AAAAAA2T7R73Y>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am no expert on reflection in go but I was wondering if you had any plan to support reflection for base types such as the example that follows. I was surprised to have to use a custom parser (albeit a simple one) to parse a list of string and integers.
The text was updated successfully, but these errors were encountered: