openconfig / goyang

YANG parser and compiler to produce Go language objects
Apache License 2.0
220 stars 84 forks source link

Depreciate Modules.FindModuleByPrefix method. #200

Closed wenovus closed 3 years ago

wenovus commented 3 years ago

This method doesn't make sense because prefixes may be duplicated.

Instead, searches based on the prefix alone should be based on the textual location of an AST node, whether it is an extension, uses, augment, deviation, type, or leafref, so use the FindModuleByPrefix function instead.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.02%) to 81.77% when pulling d8432e1aa271b1b53b13cfdbbcb679f3c9a2b711 on deprecate-findmodulebyprefix into 8cfbb5aa8080ff69975679494929946beb7efe8f on master.