NewStatistor 在Option层面创建Statistor
(url string, total int)
| 511 | |
| 512 | // NewStatistor 在Option层面创建Statistor |
| 513 | func (opt *Option) NewStatistor(url string, total int) *pkg.Statistor { |
| 514 | stat := pkg.NewStatistor(url) |
| 515 | stat.Total = total |
| 516 | stat.Dictionaries = opt.Dictionaries |
| 517 | stat.Word = opt.Word |
| 518 | stat.Offset = opt.Offset |
| 519 | stat.RuleFiles = opt.Rules |
| 520 | stat.RuleFilter = opt.FilterRule |
| 521 | return stat |
| 522 | } |
| 523 | |
| 524 | func (opt *Option) NewRunner() (*Runner, error) { |
| 525 | var err error |
no test coverage detected