freeconf / yang

Standards-based management for Golang microservices
Apache License 2.0
38 stars 15 forks source link

Use reflect api type conversion to assign value in nodeutil #82

Closed HRogge closed 1 year ago

HRogge commented 1 year ago

Using the conversion function of the go reflect API allows nodeutil.reflect to assign values derived from go basic types e.g.

type MyString string

HRogge commented 1 year ago

I have added a second commit that adds the logic to convert a leaflist and throws a proper error (instead of a panic) if types are not convertible.

dhubler commented 1 year ago

looks great