Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow mage:import alias to be defined for multiple imports
- Loading branch information
Viktor Voltaire
committed
Dec 23, 2021
1 parent
2f1ec40
commit 93d46bb
Showing
8 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
mage/testdata/mageimport/samenamespace/duptargets/magefile.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// +build mage | ||
|
||
package sametarget | ||
|
||
import ( | ||
// mage:import samenamespace | ||
_ "github.com/magefile/mage/mage/testdata/mageimport/samenamespace/duptargets/package1" | ||
// mage:import samenamespace | ||
_ "github.com/magefile/mage/mage/testdata/mageimport/samenamespace/duptargets/package2" | ||
) |
7 changes: 7 additions & 0 deletions
7
mage/testdata/mageimport/samenamespace/duptargets/package1/package1.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package package1 | ||
|
||
import "fmt" | ||
|
||
func Build() { | ||
fmt.Println("build") | ||
} |
7 changes: 7 additions & 0 deletions
7
mage/testdata/mageimport/samenamespace/duptargets/package2/package2.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package package2 | ||
|
||
import "fmt" | ||
|
||
func Build() { | ||
fmt.Println("build") | ||
} |
10 changes: 10 additions & 0 deletions
10
mage/testdata/mageimport/samenamespace/uniquetargets/magefile.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// +build mage | ||
|
||
package main | ||
|
||
import ( | ||
// mage:import samenamespace | ||
_ "github.com/magefile/mage/mage/testdata/mageimport/samenamespace/uniquetargets/package1" | ||
// mage:import samenamespace | ||
_ "github.com/magefile/mage/mage/testdata/mageimport/samenamespace/uniquetargets/package2" | ||
) |
7 changes: 7 additions & 0 deletions
7
mage/testdata/mageimport/samenamespace/uniquetargets/package1/package1.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package package1 | ||
|
||
import "fmt" | ||
|
||
func Build1() { | ||
fmt.Println("build") | ||
} |
7 changes: 7 additions & 0 deletions
7
mage/testdata/mageimport/samenamespace/uniquetargets/package2/package2.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package package2 | ||
|
||
import "fmt" | ||
|
||
func Build2() { | ||
fmt.Println("build") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters