mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
27 lines
621 B
Go
27 lines
621 B
Go
package plaintext
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/Loyalsoldier/geoip/lib"
|
|
)
|
|
|
|
/*
|
|
The types in this file extend the type `typeTextOut`,
|
|
which make it possible to support more formats for the project.
|
|
*/
|
|
|
|
const (
|
|
TypeSurgeRuleSetOut = "surgeRuleSet"
|
|
DescSurgeRuleSetOut = "Convert data to Surge RuleSet"
|
|
)
|
|
|
|
func init() {
|
|
lib.RegisterOutputConfigCreator(TypeSurgeRuleSetOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
|
|
return newTextOut(TypeSurgeRuleSetOut, action, data)
|
|
})
|
|
lib.RegisterOutputConverter(TypeSurgeRuleSetOut, &TextOut{
|
|
Description: DescSurgeRuleSetOut,
|
|
})
|
|
}
|