Open na4ma4 opened 3 months ago
Bug Description When using imports, namespaces and Default, the getFunction() function will return the first matching function in the import with the same name, regardless of namespacing.
Default
So
// project magefile.go var Default = mage.Test // imported repo type Docker mg.Namespace func (Docker) Test() { log.Println("docker") } func Test() { log.Println("test") }
Will find Docker.Test() before Test().
Docker.Test()
Test()
What did you do?
Created a test repository as an example
What did you expect to happen?
$ mage test
What actually happened?
$ mage docker
Environment
Additional context
ooh, thanks for the report and the repro steps
I did a PR as well to fix it #509
Bug Description When using imports, namespaces and
Default
, the getFunction() function will return the first matching function in the import with the same name, regardless of namespacing.So
Will find
Docker.Test()
beforeTest()
.What did you do?
Created a test repository as an example
What did you expect to happen?
What actually happened?
Environment
Additional context