Skip to content

Tq/extract endpoint#1770

Merged
technoweenie merged 15 commits intoapi-masterfrom
tq/extract-endpoint
Dec 19, 2016
Merged

Tq/extract endpoint#1770
technoweenie merged 15 commits intoapi-masterfrom
tq/extract-endpoint

Conversation

@technoweenie
Copy link
Contributor

Experiment in extracting the endpoint and url alias stuff from config to a new endpoint package. I'm starting to think it belongs in api instead though.

Copy link
Contributor

@ttaylorr ttaylorr left a comment

Choose a reason for hiding this comment

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

Looking good, and mad ⚡️'s for tackling this. I think we should have some discussion about what to call this new type, but otherwise 👍

config/config.go Outdated
return c.endpointConfig().GitProtocol()
}

func (c *Configuration) endpointConfig() *endpoint.Config {
Copy link
Contributor

Choose a reason for hiding this comment

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

I really dig this. It's too bad that we have to keep something like it around in *config.Configuration, but it's nice that we can track all of the uses of it by checking out the callers of this function.


const defaultRemote = "origin"

type Config struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still not sold on having a per-package *Config type. I think that splitting out and removing stuff from the *config.Configuration type is really good, but I think that we should go one step further and figure out what an appropriate abstraction is.

What do you think about *endpoint.Finder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I dig that. Still not sure if this belongs in here or in api, though.

@ttaylorr ttaylorr mentioned this pull request Dec 16, 2016
17 tasks
@ttaylorr ttaylorr changed the base branch from tq-master to api-master December 16, 2016 23:12
@technoweenie technoweenie merged commit 3e715ee into api-master Dec 19, 2016
@technoweenie technoweenie deleted the tq/extract-endpoint branch December 19, 2016 20:00
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.

2 participants