This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
applied sync.Once to make 'app' to be the only root App #229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(This is a fix for the v1)
Applied
sync.Once
for app initialization (template for scaffold) to fix #228 and gobuffalo/buffalo#1653. (actually the same issue, but keep them all in each project since this issue could be imaged as the core library's issue) It also related to the review discussion on gobuffalo/buffalo#2239.For the long term, this issue could be resolved by gobuffalo/buffalo#2240
The first commit fixes the
App()
to usesync.Once
for the initialization function. To make the CLI compatible with the old version of apps which was created with old versions, the second commit treats those errors and fallback to the old method.It could be better to have a fixer for this, and I am considering that.
fixes #228
fixes gobuffalo/buffalo#1653