Skip to content

Commit 3fa2a38

Browse files
committed
syntatic sugar for micro.New("helloworld")
1 parent 65af488 commit 3fa2a38

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

micro.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ type Publisher = Event
4343

4444
type Option func(*Options)
4545

46+
// New represents the new service
47+
func New(name string) Service {
48+
return newService(
49+
Name(name),
50+
)
51+
}
52+
4653
// NewService creates and returns a new Service based on the packages within.
4754
func NewService(opts ...Option) Service {
4855
return newService(opts...)

0 commit comments

Comments
 (0)