Skip to content

Commit

Permalink
Merge pull request #46 from owenrumney/liamg-make-scanner-public
Browse files Browse the repository at this point in the history
Make string scanner public
  • Loading branch information
owenrumney authored Jul 9, 2021
2 parents afb57bb + 2d98c54 commit 81084b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/squealer/string_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import (
"github.com/owenrumney/squealer/pkg/result"
)

type stringScanner struct {
type StringScanner struct {
mc match.MatcherController
}

func NewStringScanner() *stringScanner {
func NewStringScanner() *StringScanner {
return NewStringScannerWithConfig(config.DefaultConfig())
}

func NewStringScannerWithConfig(conf *config.Config) *stringScanner {
func NewStringScannerWithConfig(conf *config.Config) *StringScanner {
mc := match.NewMatcherController(conf, nil, true)

return &stringScanner{
return &StringScanner{
mc: *mc,
}
}

func (s stringScanner) Scan(content string) result.StringScanResult {
func (s StringScanner) Scan(content string) result.StringScanResult {
return s.mc.EvaluateString(content)
}

0 comments on commit 81084b3

Please sign in to comment.