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

Skip to content

Drop the replace usage in go.mod. #2567

@HappyHacker123

Description

@HappyHacker123

Is your feature request related to a problem? Please describe.

Currently listmonk is using replace in the go.mod.
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.8

But according to Go Modules wikis, replace directives in modules other than the main module are ignored when building the main module.

Additionally, go install cannot install packages that use replace directives.
For example, when users try to install dapr using:

$ go install github.com/knadh/listmonk/models@latest
go: github.com/knadh/listmonk/models@latest (in github.com/knadh/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

This is because go install forbids the replace directive as stated in issue.

Describe the solution you'd like
It seems that the replace is under use. Would it possible to remove the replace directive directly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions