Skip to content

Commit ae32ddb

Browse files
authored
Apply suggestions from code review
1 parent 7d2b5ac commit ae32ddb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,9 @@ func withConnPool(pool *conn.Pool) Option {
806806
}
807807
}
808808

809-
func withSharedBalancer(balancer *balancer.Balancer) Option {
809+
func WithSharedBalancer(parent *Driver) Option {
810810
return func(ctx context.Context, c *Driver) error {
811-
c.balancer = balancer
811+
c.balancer = parent.balancer
812812

813813
return nil
814814
}

with.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (d *Driver) with(ctx context.Context, opts ...Option) (*Driver, uint64, err
2626
delete(d.children, id)
2727
}),
2828
withConnPool(d.pool),
29-
withSharedBalancer(d.balancer),
29+
WithSharedBalancer(d),
3030
),
3131
opts...,
3232
)...,

0 commit comments

Comments
 (0)