Dave Wales

Exploring GeoJSON with Go and its lack of generics

GeoJSON is an open format for geographical data and is used in a wide range of software products and libraries. Golang is a strictly typed language, which means that expressing the data model of GeoJSON can be challenging, because the data structure will change depending on what geometry type you want to represent.

How To Create Testable Go Code

This approach can be used to easily mock out any part of the code, including HTTP calls, database queries, and more. There is also an added advantage of making the code more modular and maintainable. Try this out on your own codebase and see how much more of your code you can test!