From 3fa2a38d76530a3cd7fb2cb4b0b6b03093881d00 Mon Sep 17 00:00:00 2001 From: asim Date: Wed, 23 Apr 2025 12:21:21 +0100 Subject: [PATCH] syntatic sugar for micro.New("helloworld") --- micro.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/micro.go b/micro.go index 0885fa57..0a7c982b 100644 --- a/micro.go +++ b/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...)