31 lines
572 B
Go
31 lines
572 B
Go
|
// Package util ...
|
||
|
//
|
||
|
// Description : util ...
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 2022-07-04 11:45
|
||
|
package util
|
||
|
|
||
|
// NewFilter 过滤器实例
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 11:54 2022/7/4
|
||
|
func NewFilter(sourceData []byte, filterRule map[string]string) *filter {
|
||
|
return &filter{
|
||
|
sourceData: sourceData,
|
||
|
filterRule: filterRule,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// filter 数据过滤
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 11:58 2022/7/4
|
||
|
type filter struct {
|
||
|
sourceData []byte
|
||
|
filterRule map[string]string
|
||
|
}
|