Docfix: cleanup

This commit is contained in:
2025-10-09 17:58:40 +02:00
parent 97f3adbb31
commit 52f576d025
5 changed files with 49 additions and 18 deletions

View File

@@ -0,0 +1,20 @@
package protocol_test
import (
"fmt"
"git.maze.io/go/dpi/protocol"
)
func ExampleMatch() {
fmt.Println(protocol.Match("t?s?", []byte("test")))
fmt.Println(protocol.Match("t?s?", []byte("test with more data")))
fmt.Println(protocol.Match("t?s?", []byte("text with more data")))
fmt.Println(protocol.Match("select * from user", []byte("select an apple from user")))
fmt.Println(protocol.Match("select * from user", []byte("select an apple from the user")))
// Output: true
// true
// false
// true
// false
}