Skip to content

update all example_gen.go files and README.md#446

Merged
robphoenix merged 1 commit intoexercism:masterfrom
robphoenix:update/example_gen.go
Jan 17, 2017
Merged

update all example_gen.go files and README.md#446
robphoenix merged 1 commit intoexercism:masterfrom
robphoenix:update/example_gen.go

Conversation

@robphoenix
Copy link
Copy Markdown
Contributor

@robphoenix robphoenix commented Jan 16, 2017

reference: #447

README details on generating tests also updated to reflect moving
exercises into exercises subdirectory

Copy link
Copy Markdown
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in #224

#224 was fixed by #228 - you're looking for #357 / exercism/problem-specifications#351 instead.

Comment thread exercises/clock/example_gen.go Outdated
}
var j js
if err := gen.Gen("clock.json", &j, t); err != nil {
f := path.Join("exercises", "clock", "canonical-data.json")
Copy link
Copy Markdown
Member

@petertseng petertseng Jan 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@robphoenix robphoenix force-pushed the update/example_gen.go branch from 4fa0fb6 to 1027646 Compare January 16, 2017 12:19
@robphoenix robphoenix merged commit 0420866 into exercism:master Jan 17, 2017
@robphoenix robphoenix deleted the update/example_gen.go branch January 17, 2017 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants