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 PR replaces github.com/gobuffalo/packr/v2 with Go standard library's
embed
.It closes #85.
Main changes:
testdata
testdata
directories have a special meaning in that the Go toolchain ignores files in it)embed
doesn't (e.g.../testdata
doesn't work)schema
packageembed
doesn't allow to embed from directories outside the current file tree), and to avoid duplicating all schema filesschema
package, so there's no additional imports requiredCurrently it exposes one new public API,
schema.GetKnownSchema
, so that the packages importingschema
can get the files as well. But alternatively we can move the known schemas and thatGetKnownSchema
method into a newinternal/schema
orinternal/known_schemas
package.internal
packages are treated special by Go, in that all packages in this repo can access that package, but it won't be part of the public API anymore. I think this makes sense, but wanted to keep it simple for now, to have a first basis for discussing the PR. Please let me know what you think about this.main
on commit 6e6b96e, without any code changes, runninggo mod tidy
with Go 1.17 changed thego.mod
andgo.sum
files. I guess it was forgotten to be run recently? In any case I included that as first commit in this PR.Tested:
mage cbd
succeeds 🟢