-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from codeactual/build_tags
Add build tag support
- Loading branch information
Showing
12 changed files
with
149 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build darwin | ||
|
||
package comment | ||
|
||
type IfaceWithBuildTagInComment interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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 @@ | ||
// +build freebsd | ||
|
||
package comment | ||
|
||
type IfaceWithBuildTagInComment interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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 @@ | ||
// +build linux | ||
|
||
package comment | ||
|
||
type IfaceWithBuildTagInComment interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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 @@ | ||
// +build windows | ||
|
||
package comment | ||
|
||
type IfaceWithBuildTagInComment interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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,5 @@ | ||
package filename | ||
|
||
type IfaceWithBuildTagInFilename interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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,5 @@ | ||
package filename | ||
|
||
type IfaceWithBuildTagInFilename interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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,5 @@ | ||
package filename | ||
|
||
type IfaceWithBuildTagInFilename interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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,5 @@ | ||
package filename | ||
|
||
type IfaceWithBuildTagInFilename interface { | ||
Sprintf(format string, a ...interface{}) string | ||
} |
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,24 @@ | ||
package mockery | ||
|
||
import ( | ||
"os" | ||
"path/filepath" | ||
) | ||
|
||
var fixturePath string | ||
|
||
func init() { | ||
dir, err := os.Getwd() | ||
if err != nil { | ||
panic(err) | ||
} | ||
fixturePath = filepath.Join(dir, "fixtures") | ||
} | ||
|
||
// getFixturePath returns an absolute path to a fixture sub-directory or file. | ||
// | ||
// getFixturePath("src.go") returns "/path/to/fixtures/src.go" | ||
// getFixturePath("a", "b", "c", "src.go") returns "/path/to/fixtures/a/b/c/src.go" | ||
func getFixturePath(subdirOrBasename ...string) string { | ||
return filepath.Join(append([]string{fixturePath}, subdirOrBasename...)...) | ||
} |
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
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
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