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) {
|
func (c *Cli) QueueGetMyData() ([]byte, error) {
|
||||||
return c.QueueGetData(os.Getenv("REPLAY_QUEUEID"))
|
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"))
|
bs, err := c.QueueGetData(os.Getenv("REPLAY_QUEUEID"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(bs, i)
|
err = json.Unmarshal(bs, &i)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
func (c *Cli) QueueAbort() error {
|
func (c *Cli) QueueAbort() error {
|
||||||
|
|
Loading…
Reference in New Issue