mirror of
https://github.com/go-micro/go-micro.git
synced 2025-05-25 21:53:14 +02:00
syntatic sugar for micro.New("helloworld")
This commit is contained in:
parent
65af48823f
commit
3fa2a38d76
7
micro.go
7
micro.go
@ -43,6 +43,13 @@ type Publisher = Event
|
||||
|
||||
type Option func(*Options)
|
||||
|
||||
// New represents the new service
|
||||
func New(name string) Service {
|
||||
return newService(
|
||||
Name(name),
|
||||
)
|
||||
}
|
||||
|
||||
// NewService creates and returns a new Service based on the packages within.
|
||||
func NewService(opts ...Option) Service {
|
||||
return newService(opts...)
|
||||
|
Loading…
x
Reference in New Issue
Block a user