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

Function cmdRPUSH

lists.go:412–427  ·  view source on GitHub ↗
(m uhaha.Machine, args []string)

Source from the content-addressed store, hash-verified

410 v, err := ldb.LPop([]byte(args[1]))
411 if err != nil {
412 return nil, err
413 }
414 return v, nil
415}
416
417func cmdRPUSH(m uhaha.Machine, args []string) (interface{}, error) {
418 if len(args) < 3 {
419 return nil, uhaha.ErrWrongNumArgs
420 }
421
422 argList := make([][]byte, len(args)-2)
423 for i := 2; i < len(args); i++ {
424 argList[i-2] = []byte(args[i])
425 }
426 n, err := ldb.RPush([]byte(args[1]), argList...)
427 if err != nil {
428 return nil, err
429 }
430

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected