Skip to content

Commit

Permalink
fix: connector builder
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Dec 29, 2023
1 parent 12b1dd5 commit 13715bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,23 @@ type ConnectorBuilder struct {
config any
}

func NewConnectorBuilder(config any) ConnectorBuilder {
return ConnectorBuilder{
func NewConnectorBuilder(config any) *ConnectorBuilder {
return &ConnectorBuilder{
config: config,
mapper: DefaultMapper,
}
}

func (c ConnectorBuilder) SetMapper(mapper Mapper) ConnectorBuilder {
func (c *ConnectorBuilder) SetMapper(mapper Mapper) *ConnectorBuilder {
c.mapper = mapper
return c
}

func (c ConnectorBuilder) Build() (Connector, error) {
func (c *ConnectorBuilder) Build() (Connector, error) {
return newConnector(c.config, c.mapper)
}

func (c ConnectorBuilder) SetLogger(l *logrus.Logger) ConnectorBuilder {
func (c *ConnectorBuilder) SetLogger(l *logrus.Logger) *ConnectorBuilder {
logger.Log = &logger.Loggers{
Logrus: l,
}
Expand Down

0 comments on commit 13715bd

Please sign in to comment.