Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor spec.go to remove UnmarshalYAML boilerplate (#161)
Before this, each UnmarshalYAML function was a copy-pasted block of 20-ish lines of boilerplate. With this change, each UnmarshalYAML function turns into a one-liner which calls unmarshalPlain. This requires a somewhat regrettable amount of reflection code, but it's arguably no more confusing than what was there before, while having the benefit of being more concise and DRY. Fixes #30. I'm attempting to use stacked PRs here; I intend to switch the base branch of this PR to `main` once the `drevell/for-each-values-from` branch is merged.
- Loading branch information