1
0
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:
asim 2025-04-23 12:21:21 +01:00
parent 65af48823f
commit 3fa2a38d76

View File

@ -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...)