Get retrieves the data for the service with the given name computing it if needed. It returns nil if there is no service with the given name.
(name string)
| 644 | // Get retrieves the data for the service with the given name computing it if |
| 645 | // needed. It returns nil if there is no service with the given name. |
| 646 | func (d *ServicesData) Get(name string) *Data { |
| 647 | if data, ok := d.Services[name]; ok { |
| 648 | return data |
| 649 | } |
| 650 | service := d.Root.Service(name) |
| 651 | if service == nil { |
| 652 | return nil |
| 653 | } |
| 654 | d.Services[name] = d.analyze(service) |
| 655 | return d.Services[name] |
| 656 | } |
| 657 | |
| 658 | // Method returns the service method data for the method with the given name, |
| 659 | // nil if there isn't one. |
no test coverage detected