Skip to content

Instantly share code, notes, and snippets.

@antklim
Last active June 3, 2018 09:47
Show Gist options
  • Save antklim/2f47113a6310cfdced9a89bb1470e2f6 to your computer and use it in GitHub Desktop.
Save antklim/2f47113a6310cfdced9a89bb1470e2f6 to your computer and use it in GitHub Desktop.
Go Kit service logic implementation
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