Golang doesn’t have default implementations of queue and stack but it’s pretty simple to implement.

Queue FIFO
Let say we want to have integers queue, we can easily accomplish it by using golang slices, below is example:
for simplisity I did’t add queue size functionality

 

Stack LIFO
Implementig stack is very similar to queue, here again we are gonna use slices