-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix --strace with relative replace in vendor, see #87
- Loading branch information
Showing
20 changed files
with
206 additions
and
28 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
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
//go:build ignore | ||
// +build ignore | ||
|
||
package trace_without_dep | ||
package trace_without_dep_vendor | ||
|
||
import ( | ||
"os" | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package trace_without_dep | ||
package trace_without_dep_vendor | ||
|
||
import ( | ||
"testing" | ||
|
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 @@ | ||
module github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace | ||
|
||
go 1.14 | ||
|
||
require github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib v1.0.0 | ||
|
||
replace github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib => ./lib |
25 changes: 25 additions & 0 deletions
25
runtime/test/trace_without_dep_vendor_replace/hook_test.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,25 @@ | ||
//go:build ignore | ||
// +build ignore | ||
|
||
package trace_without_dep_vendor_replace | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
const traceFile = "TestGreet.json" | ||
|
||
func TestPreCheck(t *testing.T) { | ||
err := os.RemoveAll(traceFile) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
} | ||
|
||
func TestPostCheck(t *testing.T) { | ||
_, err := os.Stat(traceFile) | ||
if err != nil { | ||
t.Fatalf("expect %s, actual: %v", traceFile, err) | ||
} | ||
} |
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,3 @@ | ||
module github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/sub | ||
|
||
go 1.14 |
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 lib | ||
|
||
func Greet(s string) string { | ||
return "hello " + s | ||
} |
14 changes: 14 additions & 0 deletions
14
runtime/test/trace_without_dep_vendor_replace/trace_test.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,14 @@ | ||
package trace_without_dep_vendor_replace | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib" | ||
) | ||
|
||
func TestGreet(t *testing.T) { | ||
result := lib.Greet("world") | ||
if result != "hello world" { | ||
t.Fatalf("result: %s", result) | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ce/vendor/github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib/go.mod
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...ce/vendor/github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib/lib.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
runtime/test/trace_without_dep_vendor_replace/vendor/modules.txt
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,4 @@ | ||
# github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib v1.0.0 => ./lib | ||
## explicit | ||
github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib | ||
# github.com/xhd2015/xgo/runtime/test/trace_without_dep_vendor_replace/lib => ./lib |
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