'go: gopkg.in/[email protected]: parsing go.mod

go: cannot find main module, but found Gopkg.lock in

C:\Users\<github>
    to create a module there, run:
    cd ..\..\.. && go mod init

I get the following error after executing go mod init and go mod tidy

go: gopkg.in/[email protected]: parsing go.mod:
        module declares its path as: github.com/go-ldap/ldap/v3
                but was required as: gopkg.in/ldap.v3

My code only has imports for gopkg.in/ldap.v3 not sure which vendor module or package has import for github.com/go-ldap/ldap/v3

Please help in resolving this issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source