MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / getWshCommandType

Function getWshCommandType

pkg/wshrpc/wshrpcmeta.go:29–37  ·  view source on GitHub ↗
(method reflect.Method)

Source from the content-addressed store, hash-verified

27var wshRpcInterfaceRType = reflect.TypeOf((*WshRpcInterface)(nil)).Elem()
28
29func getWshCommandType(method reflect.Method) string {
30 if method.Type.NumOut() == 1 {
31 outType := method.Type.Out(0)
32 if outType.Kind() == reflect.Chan {
33 return RpcType_ResponseStream
34 }
35 }
36 return RpcType_Call
37}
38
39func getWshMethodResponseType(commandType string, method reflect.Method) reflect.Type {
40 switch commandType {

Callers 1

generateWshCommandDeclFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected