mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 06:55:03 +00:00
idiomatic -> template
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/services/idiomatic/handler"
|
"github.com/micro/services/template/handler"
|
||||||
|
|
||||||
"github.com/micro/micro/v3/service"
|
"github.com/micro/micro/v3/service"
|
||||||
"github.com/micro/micro/v3/service/logger"
|
"github.com/micro/micro/v3/service/logger"
|
||||||
24
template/cmd/template/main.go
Normal file
24
template/cmd/template/main.go
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/micro/services/template/handler"
|
||||||
|
|
||||||
|
"github.com/micro/micro/v3/service"
|
||||||
|
"github.com/micro/micro/v3/service/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// Create service
|
||||||
|
srv := service.New(
|
||||||
|
service.Name("idiomatic"),
|
||||||
|
service.Version("latest"),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Register handler
|
||||||
|
srv.Handle(new(handler.Idiomatic))
|
||||||
|
|
||||||
|
// Run service
|
||||||
|
if err := srv.Run(); err != nil {
|
||||||
|
logger.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
log "github.com/micro/micro/v3/service/logger"
|
log "github.com/micro/micro/v3/service/logger"
|
||||||
|
|
||||||
idiomatic "github.com/micro/services/idiomatic/proto"
|
idiomatic "github.com/micro/services/template/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Idiomatic struct{}
|
type Idiomatic struct{}
|
||||||
Reference in New Issue
Block a user