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

Commit c4dd3e4

Browse files
author
Juanjo Alvarez
committed
Change default returned by Engines
Rename onigurama tag to just onigurama Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
1 parent f54b609 commit c4dd3e4

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 onigurama
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 == "onigurama" {
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy