Category: Go Web Development

Golang Gorilla Sessions NewCookieStore

In this blog, we will learn about Golang Gorilla Sessions NewCookieStore. HTTP (Hypertext Transfer Protocol) being a stateless protocol does not store any kind of information about the previous requests and the user on the server. Every time a client requests a web page from the server, a new connection is started. But we can…
Read more

Golang Multipart File Upload Using Form File

In this blog, we will learn about Golang Multipart File Upload using Form File. Uploading Files on the server is useful in many scenarios like uploading your resume on a job portal, uploading your picture on any website or social media. HTML Template for Uploading File In this example, we are using bootstrap starter code…
Read more

Serve Static Files using Gorilla Mux in Golang

In the previous blog, we served static files through Golang’s HTTP file Server. In this blog, we will learn how to serve static files in Golang using Gorilla Mux. As we have already created the template and the static files that are to be served, here we are just going to update the previous code…
Read more

Golang Form Data – GET and POST Method

Forms play a major role in a website, whenever we want to collect data from the user and want to process it on our server. You already have seen so many websites where you need to login and register, all those websites implement HTML Forms and the data entered is stored on the server. We…
Read more

Golang Gorilla Schema HTML Forms

In the previous blog, we saw how to read form data using the net/http package. This time we will use Golang gorilla schema to read form data. Golang Gorilla Schema First of all learn about Golang HTML Forms then use gorilla schema. Full Source Code: Learn more about Golang HTML Forms from

Serve Static Files in Golang Using FileServer

Static Files plays a very important role in web development. Static Files like Images, CSS, JS, etc makes our website beautiful and interactive. In this blog, we will learn how to Serve Static files in Golang HTTP Server. In the previous blog we learned about Golang templates, we will use the same template with a…
Read more

Golang HTML Template ParseFiles and Execute

Golang HTML Template ParseFiles and Execute, parses the HTML Files, and then Execute it to allow us to display dynamic data with the help of placeholders, that can be replaced with the values at the runtime, by the template engine. The data can also be transformed according to users’ needs. In this blog, we will…
Read more

Golang Gorilla Mux NewRouter Handle

Golang has net/http package for managing HTTP. Then Why we need a third-party Golang package Gorilla Mux. The answer is Go’s net/http package offers a lot of features for HTTP requests routing but one thing it doesn’t do very well is Dynamic Routing, which will be achieved by Golang Gorilla Mux NewRouter Handle Function. Dynamic…
Read more

Golang HTTP HandleFunc | Request Routing

Web Development is all about multiple routing, so we have to define more than one URL route in a Go Web Application using Golang net/http HandleFunc to enable multiple Request Routing. This also includes mapping of the path to the respective Handlers and resources. In this example, we are going to make three endpoints, such…
Read more

Creating a Simple HTTP Server in Golang

A Simple HTTP Server in Golang can easily be created using Golang’s net/http package. In this blog, we will be creating a simple HTTP Server in Golang that will render some text on the browser. Create a http-server.go file and copy the code. Golang HTTP Server Run the program from the command line. After running…
Read more