DescribeService returns name of the service, if it has one, or returns string representation of the service.
(service Service)
| 134 | |
| 135 | // DescribeService returns name of the service, if it has one, or returns string representation of the service. |
| 136 | func DescribeService(service Service) string { |
| 137 | name := "" |
| 138 | if named, ok := service.(NamedService); ok { |
| 139 | name = named.ServiceName() |
| 140 | } |
| 141 | if name == "" { |
| 142 | name = fmt.Sprintf("%v", service) |
| 143 | } |
| 144 | return name |
| 145 | } |