Townsourced Tech Blog

Tech musings from a local development agency


Choosing A Library to Embed Static Assets in Go

  • 26
  • Apr
  • 2018
One of the oft-touted benefits of Go is that applications written in it are easily deployed because they are statically complied. A lot of this benefit goes away if you need to manage the location and permissions on a bunch of files needed to run a web application. The solution is to compile any necessary files into the application binary itself. This can be done in Go by using a byte slice literal containing the string representation of the bytes in a file.

Anatomy of a Go Web App - Part 2: Authentication

  • 15
  • Jan
  • 2017

This is part two of a set of posts breaking down some of the decisions I made when putting together the web server for townsourced. The first part is here.

Instead of a general overview, like part one, this post will focus specifically on User Authentication, i.e. how to handle passwords (if at all) and session management.

Anatomy of a Go Web Application

  • 4
  • Dec
  • 2016

When building a web application from scratch, there are a lot of decisions to make. The goal of this guide is to give one more example of how you can go about building a web application in the Go language, as well as to give you an idea what things you need to start thinking about and plan for before you get started.

This guide is not intended to be exhaustive, nor is it absolute. It is a compendium of the things I thought about and how I dealt with them when building Hopefully you’ll find it useful.