MCPcopy Create free account
hub / github.com/goadesign/goa / GetMethod

Method GetMethod

jsonrpc/integration_tests/framework/types.go:220–230  ·  view source on GitHub ↗

GetMethod returns the effective JSON-RPC method name to use on the wire. It strips the grpc_ prefix convention and preserves transport suffixes.

(fallback string)

Source from the content-addressed store, hash-verified

218// GetMethod returns the effective JSON-RPC method name to use on the wire.
219// It strips the grpc_ prefix convention and preserves transport suffixes.
220func (r Request) GetMethod(fallback string) string {
221 base := r.Method
222 if base == "" {
223 base = fallback
224 }
225 info, err := ParseMethod(base)
226 if err != nil {
227 return base
228 }
229 return info.Name()
230}
231
232// getMapKeys returns sorted keys from a map[string]bool
233func getMapKeys(m map[string]bool) []string {

Callers 4

executeHTTPMethod · 0.80
executeSSESequenceMethod · 0.80
executeBatchMethod · 0.80
collectMethodsMethod · 0.80

Calls 2

ParseMethodFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected