mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-27 04:30:12 +08:00
27 lines
672 B
Go
27 lines
672 B
Go
package plaintext
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/Loyalsoldier/geoip/lib"
|
|
)
|
|
|
|
/*
|
|
The types in this file extend the type `typeTextIn`,
|
|
which make it possible to support more formats for the project.
|
|
*/
|
|
|
|
const (
|
|
TypeSurgeRuleSetIn = "surgeRuleSet"
|
|
DescSurgeRuleSetIn = "Convert Surge RuleSet to other formats (just processing IP & CIDR lines)"
|
|
)
|
|
|
|
func init() {
|
|
lib.RegisterInputConfigCreator(TypeSurgeRuleSetIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
|
|
return newTextIn(TypeSurgeRuleSetIn, DescSurgeRuleSetIn, action, data)
|
|
})
|
|
lib.RegisterInputConverter(TypeSurgeRuleSetIn, &TextIn{
|
|
Description: DescSurgeRuleSetIn,
|
|
})
|
|
}
|