Solution for 008 in Go