exercism/xgo — pull request #117 by soniakeys (2014-11-01 03:38:57+00:00)
Title: gigasecond: test prog rewrite

This addresses the first point of https://github.com/exercism/xgo/issues/110 by removing the requirement to define a Gigasecond value. The second point of https://github.com/exercism/xgo/issues/110 doesn't seem called for by either the problem or the Go documentation of the time.Time type. The Go documentation says "[Changing the location] changes only the presentation; it does not change the instant in time being denoted and therefore does not affect the computations...." I see location as a non-issue for this problem.

For the exercise to "enter your birthday," the solver must now define a variable in the submitted program. This allows discussion on various ways to initialize a time.Time. Also TestVersion is added. These are the API changes.

The test program now uses common test data from x-common. Example_gen.go generates this. Example_gen.go has a different structure than the one for clock. This one uses Go text/templates as a step toward reuse of generation code in the future.