aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2020-02-21 10:49:54 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2020-02-21 10:49:54 +0300
commit6e716c0eb8958c5d7700e0712a175e8e98d0ba0a (patch)
treed92656587b33f15fef80a8351cb7f46f51e6775d
parent757b2766cd4491ceb7eed5075c1477ba91880fbf (diff)
Fix constructor name
-rw-r--r--example/main.go2
-rw-r--r--marusia.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/example/main.go b/example/main.go
index 404c970..25e3720 100644
--- a/example/main.go
+++ b/example/main.go
@@ -11,7 +11,7 @@ import (
)
func main() {
- m := marusia.NewMarusia(messageHandler)
+ m := marusia.New(messageHandler)
server := http.Server{
Addr: ":8080",
Handler: m.Handler(),
diff --git a/marusia.go b/marusia.go
index 5356720..953c45c 100644
--- a/marusia.go
+++ b/marusia.go
@@ -47,8 +47,8 @@ func (m *Marusia) SetErrorLogger(errorLogger func(error)) *Marusia {
return m
}
-// NewMarusia is API constructor
-func NewMarusia(handler MessageHandler) *Marusia {
+// New is API constructor
+func New(handler MessageHandler) *Marusia {
return &Marusia{handler: handler, ctx: context.Background()}
}