added your example code... not sure it's worth the reference of the simplified Go 1.1 version.