Skip to content

Update session.go add InstantEnsureIndex - #446

Open
sulthonzh wants to merge 1 commit into
go-mgo:v2from
sulthonzh:patch-1
Open

Update session.go add InstantEnsureIndex#446
sulthonzh wants to merge 1 commit into
go-mgo:v2from
sulthonzh:patch-1

Conversation

@sulthonzh

Copy link
Copy Markdown

InstantEnsureIndex

Comment thread session.go

for k, v := range indexMap {
fields := strings.Split(k, "_")
index := mgo.Index{}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This call to package mgo is failing the build. Type Index already exists in the same package.

@vivace-io

Copy link
Copy Markdown

Naming feels rather confusing, doesn't seem to accurately describe what the function does. Might want to consider another name?

@vivace-io vivace-io mentioned this pull request Jul 19, 2017
@hexadecy

Copy link
Copy Markdown

I suggest EnsureIndexFromStruct.

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