The Go version of the Palindrome Products exercise asks you to define a type for Product
. However, the test cases rely on it being a struct where the first field must be an int
and the second field must be a [][2]int
named Factorizations
.
I think the struct should just be provided in the template, since the only way to know the exact format for it is by looking at or running the test cases. In my opinion, asking the student to define the struct does not add value to the exercise, it just makes it more confusing.
Also, I don’t think it should test for specific error messages, because those are also only discoverable by looking at or running the tests. Not to mention that tests based on specific error strings tend to be discouraged in the Go community.
I don’t think either of these changes would impact existing solutions.