Solution to leap problem in Go