Skip to content

Conversation

briansan
Copy link
Contributor

For my project, it is useful to have a reference to the next position that the syncer will read from :)

}

// GetNextPosition returns the next position of the syncer
func (b *BinlogSyncer) GetNextPosition() *Position {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer return copy Position to avoid outer changing the nextPos.

@briansan
Copy link
Contributor Author

Thank you quick reply! I have updated the function signature to return an instance of Position instead of pointer and return b.nextPos by value

@siddontang
Copy link
Collaborator

LGTM

@siddontang siddontang merged commit 89fc821 into go-mysql-org:master Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants