Last active
June 3, 2018 09:47
-
-
Save antklim/2f47113a6310cfdced9a89bb1470e2f6 to your computer and use it in GitHub Desktop.
Go Kit service logic implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package greeterservice | |
// Service describe greetings service. | |
type Service interface { | |
Health() bool | |
Greeting(name string) string | |
} | |
// GreeterService implementation of the Service interface. | |
type GreeterService struct{} | |
// Health implementation of the Service. | |
func (GreeterService) Health() bool { | |
return true | |
} | |
// Greeting implementation of the Service. | |
func (GreeterService) Greeting(name string) (greeting string) { | |
greeting = "GO-KIT Hello " + name | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment