From 810f331e6a2f3dde24cd1d19a1515beadb9e7667 Mon Sep 17 00:00:00 2001 From: m4ex <4exmail@gmail.com> Date: Fri, 13 Sep 2024 15:09:19 +0300 Subject: [PATCH] method chaining setter --- dialect/mysqldialect/dialect.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dialect/mysqldialect/dialect.go b/dialect/mysqldialect/dialect.go index 865d2aa7a..959df66ae 100644 --- a/dialect/mysqldialect/dialect.go +++ b/dialect/mysqldialect/dialect.go @@ -51,8 +51,7 @@ func New() *Dialect { return d } -func NewWithLocation(loc string) *Dialect { - d := New() +func (d *Dialect) WithTimeLocation(loc string) *Dialect { location, err := time.LoadLocation(loc) if err != nil { panic(fmt.Errorf("mysqldialect can't load provided location %s: %s", loc, err))