mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Refactor Oniguruma integration
Instead of use a command to change imports before build, using a build tag to generate the correct binary. This will allow applications to compile enry using oniguruma with less troubles. Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
This commit is contained in:
committed by
Denys Smirnov
parent
8da8516ac1
commit
15bb13117f
17
regex/oniguruma.go
Normal file
17
regex/oniguruma.go
Normal file
@ -0,0 +1,17 @@
|
||||
// +build oniguruma
|
||||
|
||||
package regex
|
||||
|
||||
import (
|
||||
"github.com/moovweb/rubex"
|
||||
)
|
||||
|
||||
type EnryRegexp = *rubex.Regexp
|
||||
|
||||
func MustCompile(str string) EnryRegexp {
|
||||
return rubex.MustCompile(str)
|
||||
}
|
||||
|
||||
func QuoteMeta(s string) string {
|
||||
return rubex.QuoteMeta(s)
|
||||
}
|
Reference in New Issue
Block a user