Create A Simple RESTful API With Golang

Learn how to create a simple RESTful API using mock data and the Go programming language in this tutorial.

Learn how to use the mux URL router to create various CRUD endpoints for manipulating mock data that has been hardcoded into the application.

A written version of this video can be seen on my blog at


Sam Logan says:

I read your home directory as ‘NRA boy’

ThaEzioAuditore says:

This was brilliant ! thank you ever so much for taking the time to share this with us !

Theerayooth Kosin says:

Very good tutorial ! thanks. I’m a newbie for golang and looking for restful api.

Poka says:

which editor you are using?

Timothy Ho says:

Hey Nic, great example, do you think you could make a video with a database and a front end?

Fagner Feitosa says:

Which IDE do you use?

Raymon wiliknieut says:

Great tutorial! It helped allot to keep it clean and simple!.
Thanks explaining how the simple structure of api’s work in Golang.

Fandy Dharmawan says:

what atom plugin you use so it can automatically import required library?

Luke Tannenbaum says:

Hey there-great video! Unfortunately, when I get to the postman stage and try to ping the API through localhost just like you, it always returns null for the response! Could there be something weird with port forwarding or firewalls blocking certain things from working, or could the fact that I’m on public wifi be messing something up? Thanks!

mikeyn1ne says:

can you share a list of the plugins you’re using with atom?

Francisco Grau says:

Hi Nic, I know that this is a quick demo, but you should be returning the right HTTP status codes: 201 for new records, 404 when getting/deleting an unknown ID, 400 if the ID already exists and you try to create a new one.
Thanks for the tutorial!

Aleksandar Markovic says:

Great job !!! this is first video with real rest api in golang

Conor says:

Really helpful thanks!

MrChrisMoo says:

Do you have part 2 available yet?

Meddie Frercury says:

Outstanding. Thanks for the video!

Luis Fernando Gaido says:

Excellent, budy!

Zama Khan Mohammed says:

CreatePerson should not have {id}, UpdatePerson should have it, since in real world scenario new id will be created by backend, since front end won’t know which is the new id that has to be created.

Adeel Farzand says:

Which plugins are you using???

Terence Kearns says:

Great job with this tutorial

Alec Hale-Pletka says:

Great work ! Thank you for sharing

Noah Nobody says:

I’ve literally been looking at Go for the last few hours, and damn, it looks so powerful , but clean and sexy.

Alessandro says:

Well i think that go syntax is not so easy like Python or Ruby, but i think is the language of the feature … freakin fast!!

suresh rajput says:

Hi Sir,

M getting below error on postman

404 page not found
what to do

Lizardan says:

Why didn’t you have to type “return” for GetPeopleEndPoint? line 30

Rajarajan Thangarasu says:

I like the theme you are using. May I know the name of it?

Bartosz Flis says:

One thing worth remembering is that this API implementation is not safe to call concurrently, as there are methods modifying a global data structure. I don’t think this implication was mentioned in the video. @Nic Raboy great work man!

Just Anthony says:

For a newbie like me, this is gold. Thank you very much!

Nidhin David says:

The JSON encoder you are using is not setting the Content-Type header as application/json. That is why the response appears non-formatted in Postman. The tutorial was awesome and I already built it. Thanks for the great explanation.

Shino says:

how to build a pagination system ?

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours