MCPcopy Create free account
hub / github.com/tendermint/tendermint / nonJSONStringToArg

Function nonJSONStringToArg

rpc/jsonrpc/server/http_uri_handler.go:144–160  ·  view source on GitHub ↗
(rt reflect.Type, arg string)

Source from the content-addressed store, hash-verified

142}
143
144func nonJSONStringToArg(rt reflect.Type, arg string) (reflect.Value, bool, error) {
145 if rt.Kind() == reflect.Ptr {
146 rv1, ok, err := nonJSONStringToArg(rt.Elem(), arg)
147 switch {
148 case err != nil:
149 return reflect.Value{}, false, err
150 case ok:
151 rv := reflect.New(rt.Elem())
152 rv.Elem().Set(rv1)
153 return rv, true, nil
154 default:
155 return reflect.Value{}, false, nil
156 }
157 } else {
158 return _nonJSONStringToArg(rt, arg)
159 }
160}
161
162// NOTE: rt.Kind() isn't a pointer.
163func _nonJSONStringToArg(rt reflect.Type, arg string) (reflect.Value, bool, error) {

Callers 1

httpParamsToArgsFunction · 0.85

Calls 2

_nonJSONStringToArgFunction · 0.85
SetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…