MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / interfaceToString

Function interfaceToString

IceFireDB-PubSub/test/test_test.go:164–179  ·  view source on GitHub ↗
(args []interface{})

Source from the content-addressed store, hash-verified

162}
163
164func interfaceToString(args []interface{}) []string {
165 argList := make([]string, len(args))
166 for k, v := range args {
167 switch val := v.(type) {
168 case time.Duration:
169 argList[k] = val.String()
170 case string:
171 argList[k] = val
172 case int:
173 argList[k] = strconv.Itoa(val)
174 default:
175 panic(reflect.TypeOf(v))
176 }
177 }
178 return argList
179}
180
181func directDo(tb testing.TB, c *proto.Client, args ...interface{}) {
182 tb.Helper()

Callers 11

directDoFunction · 0.70
directDoNotParseFunction · 0.70
directDoStringFunction · 0.70
directDoStringArrErrFunction · 0.70
directDoStringErrFunction · 0.70
directDoIntFunction · 0.70
directDoIntErrFunction · 0.70
directDoFloatErrFunction · 0.70
directDoBoolFunction · 0.70
directDoBoolErrFunction · 0.70
directDoListFunction · 0.70

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected