update all example_gen.go files and README.md#446
Conversation
petertseng
left a comment
There was a problem hiding this comment.
in #224
#224 was fixed by #228 - you're looking for #357 / exercism/problem-specifications#351 instead.
| } | ||
| var j js | ||
| if err := gen.Gen("clock.json", &j, t); err != nil { | ||
| f := path.Join("exercises", "clock", "canonical-data.json") |
There was a problem hiding this comment.
The path.Join("exercises", whateverslug, "canonical-data.json") is common to every single example_gen.go. How would you feel about moving it into the Gen function?
I would like to be able to say gen.Gen(whateverSlug, &j, t), and have it infer the path from the slug. That means further reorganisational changes like exercism/problem-specifications#351 can be dealt with by just changing Gen, rather than every single generator.
(I know I kinda repeated myself and you already responded in the other PR, sorry about that)
There was a problem hiding this comment.
no worries, I won't repeat myself here, leave this PR for the time being and hopefully I'll have the gen.Gen function working this way soon.
reference: exercism#447 README details on generating tests updated to reflect moving exercises into exercises subdirectory
4fa0fb6 to
1027646
Compare
reference: #447
README details on generating tests also updated to reflect moving
exercises into exercises subdirectory