Skip to content

Receiver type change breaks use of constructed Migrator #13

@creachadair

Description

@creachadair

Commit a7bc68f appears to have changed the methods of the Migrator type to accept a pointer rather than a value. The NewMigrator constructor, however, still returns a Migrator by value, which means that a call like:

err := schema.NewMigrator().Apply(x, y)

(which used to work) will now fail because the Migrator is in a temporary and the compiler will not desugar the address.

For now I can work around this by rewriting expressions like the above as:

m := schema.NewMigrator()
err := m.Apply(x, y)

but I think the value returned by the constructor should have the correct type for use by the methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions