Skip to content

Commit

Permalink
Merge pull request #65 from shogo82148/add-go-build-tag
Browse files Browse the repository at this point in the history
add //go:build lines
  • Loading branch information
shogo82148 committed Jun 26, 2021
2 parents 03a1844 + 52f2d61 commit e6dd8db
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
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

0 comments on commit e6dd8db

Please sign in to comment.