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

Function cmdHSTRLEN

hashes.go:239–250  ·  view source on GitHub ↗
(m uhaha.Machine, args []string)

Source from the content-addressed store, hash-verified

237
238 return n, nil
239}
240
241func cmdHSTRLEN(m uhaha.Machine, args []string) (interface{}, error) {
242 if len(args) != 3 {
243 return nil, uhaha.ErrWrongNumArgs
244 }
245
246 val, err := ldb.HGet([]byte(args[1]), []byte(args[2]))
247 if err != nil {
248 return nil, err
249 }
250
251 return redcon.SimpleInt(len(val)), nil
252}
253

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected