Adrian Brad

Results 5 comments of Adrian Brad

Hello @Nyx2022, I would like to help but I'm not sure which type of marshalling you are referring to. Do you mean any of the interfaces found in the [encoding](https://pkg.go.dev/encoding)...

Are you requesting that the queue’s contents be displayed in the output when the queue object is marshaled to JSON? Something like this? ```go q := queue.NewBlocking([]int{1, 2, 3}) b,...

Hello @Jcodelove, In your test, you reset the queue(`queue.Reset()`), which reloads all the initial elements back into it. Since the queue’s capacity is set to 5, matching the number of...

There is a [Clear](https://github.com/adrianbrad/queue/blob/bd2869a00f482ea6d579a2dabd3fe5bcd8a5ef8f/queue_interface.go#L37) function available, and you are calling it in the test you provided. It clears the queue, returning all elements it contains, leaving the queue empty.

You are right, I will provide a fix for that