Skip to content

Manifest config attempt 2#1767

Merged
technoweenie merged 11 commits intotq-masterfrom
tq/manifest-cfg-2
Dec 14, 2016
Merged

Manifest config attempt 2#1767
technoweenie merged 11 commits intotq-masterfrom
tq/manifest-cfg-2

Conversation

@technoweenie
Copy link
Contributor

@technoweenie technoweenie commented Dec 13, 2016

This is a slightly different approach to #1766. Instead of introducing a new tq.WithGitEnv() option, this assumes that the caller will configure the *tq.Manifest, which is now a required argument for NewTransferQueue(). I was able to remove all config references inside the tq package except for the internal uses (which is tied to internal api methods still using it). Nothing in the exported interface uses config anymore though.

I like this approach, it gets us closer to @sinbad's idea of a config object per package. Could even rename *tq.Manifest to *tq.Config if you think that'd make more sense.

Notes:

@technoweenie
Copy link
Contributor Author

@ttaylorr I got rid of the Init* functions on *tq.Manifest, in favor of a tq.NewManifestFromGitConfig(git tq.Env) constructor. Ready for review.

@ttaylorr ttaylorr mentioned this pull request Dec 13, 2016
5 tasks
@sinbad
Copy link
Contributor

sinbad commented Dec 14, 2016

Great, isolating the config into a pure data-carrier per package that's populated by the reflection stuff feels way more robust than mixing that in other types.

@technoweenie technoweenie merged commit 7288d20 into tq-master Dec 14, 2016
@technoweenie technoweenie deleted the tq/manifest-cfg-2 branch December 14, 2016 17:06
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.

3 participants