Len returns the number of callback functions in the linked list Return value: Total number of currently registered callback functions
()
| 98 | // Len returns the number of callback functions in the linked list |
| 99 | // Return value: Total number of currently registered callback functions |
| 100 | func (t *callbacks) Len() int { |
| 101 | var count int |
| 102 | |
| 103 | // Traverse linked list to count |
| 104 | for callback := t.first; callback != nil; callback = callback.next { |
| 105 | count++ |
| 106 | } |
| 107 | |
| 108 | return count |
| 109 | } |