(k *Kong, key string)
| 380 | } |
| 381 | |
| 382 | func buildGroupForKey(k *Kong, key string) *Group { |
| 383 | if key == "" { |
| 384 | return nil |
| 385 | } |
| 386 | for _, group := range k.groups { |
| 387 | if group.Key == key { |
| 388 | return &group |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | // No group provided with kong.ExplicitGroups. We create one ad-hoc for this key. |
| 393 | return &Group{ |
| 394 | Key: key, |
| 395 | Title: key, |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | func checkDuplicateNames(node *Node, v reflect.Value) error { |
| 400 | seenNames := make(map[string]struct{}) |
no outgoing calls
no test coverage detected
searching dependent graphs…