Introduction

Quite often, we would like to create HTML forms to get the information from a client in a specified format, upload files or folders to the server, and generate generic HTML templates, rather than repeating the same static text. With the knowledge of the concepts covered in this chapter, we will be able to implement all these functionalities efficiently in Go.

In this chapter, we will start with creating a basic template and then move on to serve static files, such as .js, .css, and images from a filesystem, and eventually create, read, and validate HTML forms and upload a file to the server.

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.