In this article, we would be discussing implementing a stack in Golang.
It would be a continuation of my series of implementing Data Structures in Golang


What is Stack?




In this article, we would be discussing the implementation of Queue(backed by Array/Slice) in Golang
This would be a follow-up to my recent article:


A queue is an abstract data structure (ADT) that follows a particular order in which the operations are performed.
It follows the First In First Out (LIFO) order for operations.
In a layman example, a queue is any queue of consumers for a resource where the consumer that came first is served first.


If a reader with a basic understanding of Golang might know that it has data structures like array, slice, map.
But being accustomed to Java, I missed the support of the Collections framework, its simplicity in usage, and multiple options like HashMap, TreeMap, ConcurrentHashMap, etc. which we can use as per our requirements.



A linked list is a linear data structure…

In this article, we would be building a GraphQL server to interact with our backend i.e. MySQL database.
Code related to the article will be attached at the end.

Why GraphQL?

That’s the first question I had asked myself when my team had the requirement to expose GraphQL endpoints along with already existing RESTful APIs.
Upon some brainstorming (which is nothing but Google, StackOverflow articles) we reached our conclusion.

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients…

Article focuses on developing a basic RESTful CRUD API’s using Golang & MySql as backend database.
Github link related to the article has been attached in the end.


mkdir rest-go-demo &&…

Vishal Jain

Learning a new thing at a time, Senior Developer at Connectwise

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store