micro/template/main.go

31 lines
491 B
Go
Raw Normal View History

2015-01-13 23:31:27 +00:00
package main
import (
2015-01-31 16:49:21 +01:00
log "github.com/golang/glog"
2015-05-05 19:05:06 +01:00
"github.com/myodc/go-micro/cmd"
"github.com/myodc/go-micro/server"
"github.com/myodc/go-micro/template/handler"
2015-01-13 23:31:27 +00:00
)
func main() {
// optionally setup command line usage
cmd.Init()
2015-01-13 23:31:27 +00:00
server.Name = "go.micro.service.template"
// Initialise Server
server.Init()
// Register Handlers
server.Register(
server.NewReceiver(
new(handler.Example),
),
)
// Run server
if err := server.Run(); err != nil {
log.Fatal(err)
}
}