goyang icon indicating copy to clipboard operation
goyang copied to clipboard

Pattern Modifier in YangType

Open steiler opened this issue 6 months ago • 1 comments

Via #241 the Modifier field was added to the Pattern struct. However, the YangType is still lacking the modifier information. Unfortunately the Pattern field is a []string (https://github.com/openconfig/goyang/blob/master/pkg/yang/yangtype.go#L249).

The conversion / resolution is done here: https://github.com/openconfig/goyang/blob/master/pkg/yang/types.go#L370-L377

I want to implement the modifier in the YangType. Should the pattern field remain a []string or should it become a

type ytPattern struct {
  pattern string
  inverted bool
}

Which would be a breaking change.

steiler avatar Aug 02 '24 13:08 steiler