Descendants returns an iterator over the child Options if any.
()
| 47 | |
| 48 | // Descendants returns an iterator over the child Options if any. |
| 49 | func (o *Options) Descendants() iter.Seq[*Options] { |
| 50 | return func(yield func(*Options) bool) { |
| 51 | for c := o.child; c != nil; c = c.child { |
| 52 | if !yield(c) { |
| 53 | return |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // HasChild checks if the Options has a child Options. |
| 60 | func (o *Options) HasChild() bool { |
no outgoing calls
no test coverage detected