Fixing the QueueGetMyJson function by using pointers.

master
Pedro de Oliveira Guedes 2022-03-04 14:23:27 -03:00
parent 18801a7b94
commit cdf0c422a3
1 changed files with 2 additions and 2 deletions

View File

@ -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 {