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

Function directDoInt

IceFireDB-PubSub/test/test_test.go:230–243  ·  view source on GitHub ↗
(tb testing.TB, c *proto.Client, args ...interface{})

Source from the content-addressed store, hash-verified

228}
229
230func directDoInt(tb testing.TB, c *proto.Client, args ...interface{}) int {
231 tb.Helper()
232 argList := interfaceToString(args)
233
234 res, err := c.Do(argList...)
235 ok(tb, err)
236 i, err := proto.Parse(res)
237 if err, ok := i.(error); ok {
238 tb.Errorf("parse int error:%s", err.Error())
239 return 0
240 }
241 ok(tb, err)
242 return i.(int)
243}
244
245func directDoIntErr(tb testing.TB, c *proto.Client, args ...interface{}) (int, error) {
246 tb.Helper()

Callers

nothing calls this directly

Calls 5

ParseFunction · 0.92
interfaceToStringFunction · 0.70
okFunction · 0.70
DoMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected