Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

inconsistent order of methods on the mock interface between source and reflect mode #499

@marten-seemann

Description

@marten-seemann

Actual behavior
Consider the following interface:

type WriteCloser interface {
	Write()
	Close()
}

In source mode Write() will come before Close(). In reflect mode, Close() will come before Write().

While the Go compiler doesn't care about the order, it would be nice if the order was consistent between the two modes (imagine switching from source to reflect mode in a project. It would be nice if you wouldn't have to commit a large batch of changes to the mock files in your VCS).

Expected behavior

The order should be consistent. Alphabetically ordered, for example.

To Reproduce Steps to reproduce the behavior

see example

Additional Information

  • gomock mode (reflect or source): both
  • gomock version or git ref: 1.4.4
  • golang version: 1.15.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions