(sc *ServiceConfig, method string)
| 1095 | } |
| 1096 | |
| 1097 | func getMethodConfig(sc *ServiceConfig, method string) MethodConfig { |
| 1098 | if sc == nil { |
| 1099 | return MethodConfig{} |
| 1100 | } |
| 1101 | if m, ok := sc.Methods[method]; ok { |
| 1102 | return m |
| 1103 | } |
| 1104 | i := strings.LastIndex(method, "/") |
| 1105 | if m, ok := sc.Methods[method[:i+1]]; ok { |
| 1106 | return m |
| 1107 | } |
| 1108 | return sc.Methods[""] |
| 1109 | } |
| 1110 | |
| 1111 | // GetMethodConfig gets the method config of the input method. |
| 1112 | // If there's an exact match for input method (i.e. /service/method), we return |
no outgoing calls
no test coverage detected