MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / convertComplex

Function convertComplex

pkg/service/service.go:89–96  ·  view source on GitHub ↗
(argType reflect.Type, jsonArg any)

Source from the content-addressed store, hash-verified

87}
88
89func convertComplex(argType reflect.Type, jsonArg any) (any, error) {
90 nativeArgVal := reflect.New(argType)
91 err := utilfn.DoMapStructure(nativeArgVal.Interface(), jsonArg)
92 if err != nil {
93 return nil, err
94 }
95 return nativeArgVal.Elem().Interface(), nil
96}
97
98func isSpecialWaveArgType(argType reflect.Type) bool {
99 return argType == waveObjRType || argType == waveObjSliceRType || argType == waveObjMapRType || argType == wsCommandRType

Callers 1

convertArgumentFunction · 0.85

Calls 1

DoMapStructureFunction · 0.92

Tested by

no test coverage detected