Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export environ as its own lib #169

Merged
merged 2 commits into from
Nov 14, 2018
Merged

export environ as its own lib #169

merged 2 commits into from
Nov 14, 2018

Conversation

nickatsegment
Copy link
Contributor

@nickatsegment nickatsegment commented Nov 14, 2018

I could have just copy-pasted this stuff, but there's a fair amount of fiddly details that I think could use capturing in their own exported library

This is for another docker entrypoint system that I'm working on that would work better if chamber weren't an extra binary.

// LoadNoPaths is identical to Load, but uses v1-style "."-separated paths
//
// Deprecated like all noPaths functionality
func (e *Environ) LoadNoPaths(s store.Store, service string, collisions *[]string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This split is a little non-intuitive. Eventually we'll remove the NoPaths logic, and I'd like to keep the Load function. At that point we can roll key and load into Load.

cmd/exec.go Show resolved Hide resolved
Copy link
Contributor

@systemizer systemizer left a comment

Choose a reason for hiding this comment

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

if we're using environ functionality across multiple CLI's, it might make sense eventually to break it out into it's own repo. Just want to prevent the case where a future engineer adds to the environ library for chamber specific use-cases but forgets there are other tools using it.

Not a big deal now that since we're not actively iterating on chamber.

@nickatsegment
Copy link
Contributor Author

@systemizer Yes, that's a possibility. My stance is that as soon as you export a symbol, you should assume it's widely used and should endeavour to not break contract.

@nickatsegment nickatsegment merged commit 1561472 into master Nov 14, 2018
@nickatsegment nickatsegment deleted the break-out-environ branch November 14, 2018 19:02
@nickatsegment
Copy link
Contributor Author

Realizing that I should have made Load() accept a new interface that only requires ListRaw, since that's all it really needs. Would make mocking simpler.

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