How it works...

Once we run the program, the HTTP server will start locally listening on port 8080. Browsing http://localhost:8080 will show us an HTML form, as shown in the following screenshot:

Then submit the form with the valid values:

It will show us the Hello followed by the username on a browser screen, as shown in the following screenshot:

Submitting the form with the value as non-alpha in any of the fields will show us the error message. ...

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.