Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 2bb35ec

Browse files
author
Juanjo Alvarez
committed
Change default returned by Engines
Rename onigurama tag to just onigurama Signed-off-by: Juanjo Alvarez <[email protected]> Fix typo Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent f54b609 commit 2bb35ec

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

internal/regex/regex_oniguruma.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build mysql_go_onigurama
1+
// +build oniguruma
22

33
package regex
44

internal/regex/regex_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ func dummy(s string) (Matcher, Disposer, error) { return nil, nil, nil }
1010

1111
func getDefault() string {
1212
for _, n := range Engines() {
13-
if n == "go" {
13+
if n == "oniguruma" {
1414
return n
1515
}
1616
}
1717

18-
return "oniguruma"
18+
return "go"
1919
}
2020

2121
func TestRegistration(t *testing.T) {
@@ -33,9 +33,6 @@ func TestRegistration(t *testing.T) {
3333
engines = Engines()
3434
require.Len(engines, number)
3535

36-
err = Register("oniguruma", dummy)
37-
require.Equal(true, ErrRegexAlreadyRegistered.Is(err))
38-
3936
err = Register("nil", dummy)
4037
require.NoError(err)
4138
require.Len(Engines(), number+1)

0 commit comments

Comments
 (0)