Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mixedCase
Copy link
Contributor

Closes #11.

Also tweaks the method receivers to match the struct name.

Also changes method receivers names for the Cassandra struct to "c"
since "p" makes no sense in this context.
}

func (p *Cassandra) Open(url string) (database.Driver, error) {
func WithSession(session *gocql.Session, config *Config) (database.Driver, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for consistency with all the other drivers, shouldn't the name remain as WithInstance?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, use the name WithInstance for consistency

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

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

Since you're renaming the receiver variable, could you also replace dbLocked with c.isLocked? I think this might be causing the races we're seeing in the tests.

}

func (p *Cassandra) Open(url string) (database.Driver, error) {
func WithSession(session *gocql.Session, config *Config) (database.Driver, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Agreed, use the name WithInstance for consistency

@mixedCase
Copy link
Contributor Author

@dhui Added both requests. Travis still seems to be failing. I am unsure how these changes are affecting the tests, since (at least before the lock change) it's just a variable name change and a completely new function.

@dhui
Copy link
Member

dhui commented May 16, 2018

Yeah, I don't think your changes are related to the failing tests.

Thanks for the PR! I'll merge in your changes, but if you wanna use them, use the master branch as the failing tests are release blockers.

@dhui dhui merged commit f815731 into golang-migrate:master May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants