Fixing the QueueGetMyJson function by using pointers.
parent
18801a7b94
commit
cdf0c422a3
|
@ -135,12 +135,12 @@ func (c *Cli) QueueGetDataBody(id string) (ret []byte, err error) {
|
|||
func (c *Cli) QueueGetMyData() ([]byte, error) {
|
||||
return c.QueueGetData(os.Getenv("REPLAY_QUEUEID"))
|
||||
}
|
||||
func (c *Cli) QueueGetMyJson(i interface{}) error {
|
||||
func (c *Cli) QueueGetMyJson(i *interface{}) error {
|
||||
bs, err := c.QueueGetData(os.Getenv("REPLAY_QUEUEID"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = json.Unmarshal(bs, i)
|
||||
err = json.Unmarshal(bs, &i)
|
||||
return err
|
||||
}
|
||||
func (c *Cli) QueueAbort() error {
|
||||
|
|
Loading…
Reference in New Issue