Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add //go:build lines #65

Merged
merged 2 commits into from
Jun 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions connector.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package proxy
Expand Down
1 change: 1 addition & 0 deletions fakedb_go110_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package proxy
Expand Down
1 change: 1 addition & 0 deletions find_caller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.12
// +build go1.12

package proxy
Expand Down
1 change: 1 addition & 0 deletions find_caller_go111.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.12
// +build !go1.12

package proxy
Expand Down
1 change: 1 addition & 0 deletions proxy_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package proxy
Expand Down
17 changes: 9 additions & 8 deletions tracer_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package proxy_test
Expand Down Expand Up @@ -71,14 +72,14 @@ func TestTraceProxy(t *testing.T) {
timeComponent := `\(\d+(?:\.\d+)?[^\)]+\)`
expected := []*regexp.Regexp{
// Fake time component with (\d+\.\d+[^\)]+)
regexp.MustCompile(`tracer_test.go:27: Open 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:27: Exec 0x[0-9a-f]+: CREATE TABLE t1 \(id INTEGER PRIMARY KEY\); args = \[\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:34: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:39: Exec 0x[0-9a-f]+: INSERT INTO t1 \(id\) VALUES\(\?\); args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:42: Query 0x[0-9a-f]+: SELECT id FROM t1 WHERE id = \?; args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:49: Commit 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:57: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:61: Rollback 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:28: Open 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:28: Exec 0x[0-9a-f]+: CREATE TABLE t1 \(id INTEGER PRIMARY KEY\); args = \[\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:35: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:40: Exec 0x[0-9a-f]+: INSERT INTO t1 \(id\) VALUES\(\?\); args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:43: Query 0x[0-9a-f]+: SELECT id FROM t1 WHERE id = \?; args = \[1\] ` + timeComponent),
regexp.MustCompile(`tracer_test.go:50: Commit 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:58: Begin 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`tracer_test.go:62: Rollback 0x[0-9a-f]+ ` + timeComponent),
regexp.MustCompile(`.*:\d+: Close 0x[0-9a-f]+ ` + timeComponent),
}

Expand Down