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

make endpoints name to const defines in endpoint_gen.go #5

Closed
wants to merge 4 commits into from
Closed

Conversation

billyplus
Copy link

declare const for endpoint name. so you don't have to remenber the key string for endpoint when creating middleware
the sample of endpoint_gen.go before

for _, m := range mdw[“CheckOTP”] {
	eps.CheckOTPEndpoint = m(eps.CheckOTPEndpoint)
}

after

// Endpoints Name inside Service
const (
	EpCheckOTPName      = "CheckOTP"
	EpCheckPasswordName = "CheckPassword"
)
for _, m := range mdw[EpCheckOTPName] {
	eps.CheckOTPEndpoint = m(eps.CheckOTPEndpoint)
}

@coveralls
Copy link

coveralls commented Feb 13, 2018

Coverage Status

Coverage decreased (-0.1%) to 25.051% when pulling 5e50a29 on billyplus:master into 69ae4c3 on kujtimiihoxha:master.

@kujtimiihoxha
Copy link
Owner

@billyplus I think this PR also includes changes made in #6.
I will try to find some time to test this PR and merge it.

@billyplus billyplus closed this Dec 6, 2018
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.

None yet

3 participants