mirror of
https://github.com/wader/fq.git
synced 2024-11-29 12:14:17 +03:00
e2eb667091
As decoder now can know they are decoding as part of probing we can now use some heuristics to see if we should decode as html. The reason heuristics is needed is that x/html parser will alwaus succeed. Add lazyre package to help delay compile of RE and make it concurrency safe.
14 lines
221 B
Go
14 lines
221 B
Go
package lazyre_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/wader/fq/internal/lazyre"
|
|
)
|
|
|
|
func TestMust(t *testing.T) {
|
|
if !lazyre.New("a").Must().MatchString("a") {
|
|
t.Fatal("should compile and be non-nil and match a")
|
|
}
|
|
}
|