Category Archives: Go

The challenge of type asserting []interface{} to string slices.

 When working with JSON data it can be easy to silently miss converting data, if one is not doing the typical unmarshalling into a well defined struct but instead into a generic map[string]interface{}. Given the following data block: We can unmarshal it via If we then try and extract the data element and convert it […]

Read More

Serializing/Deserializing a complex GO struct to store externally (i.e. in a database, redis, or text file)

Sometimes one needs to serialize data to store outside of a go application. One common approach is to save it as a JSON blob which can have it’s own challenges when retrieving it. In this article I will show you how to make use of GOB to serialize a complex struct into textual data than […]

Read More

Fun with golang, Google Maps api, and proxying requests

I admire published api code that is thoroughly thought through. Recently I have been working with the Google Maps API in golang and have found that they set it up to allow one to pass in an net/http/client variable which means that it is possible to create a http client which sends the requests via […]

Read More