Kyle Ladd
Photo journal and code blog
Follow
Following
Featured
Seattle Architecture
Seattle Architecture
Kyle Ladd
Feb 13
Orange Mountain State
Orange Mountain State
When writing about photographing fall colors it’s useful to start with a black and white image.
Kyle Ladd
Oct 25, 2015
Latest
In Photos: The Seattle Waterfront
In Photos: The Seattle Waterfront
These photos were taken at around the same time of day from nearly the same location, showing the waterfront on rare clear winter days.
Kyle Ladd
Jan 3
Go Struct Field Tags by Example
The Go standard library uses tags to marshal JSON, and they’re easy enough to leverage for your own use. I wanted to serialize structs into…
query strings. I could have created a `QueryStringer` interface that all of my structs implemented, each with a `QueryString()` method for outputting the struct as a query string. This sounded like more repetitive work than I was interested in doing, so I wrote one function instead. This method uses tags the way the JSON encoding package does to generate query strings given arbitrary structs:
¶
In the above, I use the `reflect` package to work with the metadata of the passed in struct, `s`.
Kyle Ladd
Dec 5, 2015
Lost in Montreal
Lost in Montreal
Holy shit, where do I park? And how do I drive with every road closed for construction?
Kyle Ladd
Oct 25, 2015
Latest
Fallacies and Pitfalls: Cgo
Probably the first of a multi-part F&P on cgo.
Kyle Ladd
Dec 5, 2015
Mr. Robot: the Hacking Show That Almost Got It Right
Mr. Robot: the Hacking Show That Almost Got It Right
Jul 25, 2015
Kyle Ladd
Dec 5, 2015
About
Kyle Ladd
Photo journal and code blog
More information
Followers
Elsewhere
More stories →
About Kyle Ladd