Files
spray/pkg/templates.go
T
M09IcandClaude Opus 4.6 d1b63ad67b fix: regenerate templates and fix logs API for updated submodule
go generate with the updated templates submodule (7d5675c) produces
different embedded data and code. Key changes:
- cmd/cmd.go: logs.Info/Important → logs.InfoLevel/ImportantLevel
- pkg/templates.go: remove proton_rules.bin/neutron.bin embeds (no longer needed)
- core/baseline: use ProtonExtract instead of Extractors.Extract
- core/format: list proton extractor names
- Update embedded binary data files

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-26 07:25:07 -07:00

42 lines
875 B
Go

//go:build !emptytemplates
// +build !emptytemplates
package pkg
import (
_ "embed"
"github.com/chainreactors/utils/encode"
)
//go:embed data/spray_rule.bin
var sprayRuleData []byte
//go:embed data/spray_common.bin
var sprayCommonData []byte
//go:embed data/spray_dict.bin
var sprayDictData []byte
//go:embed data/extract.bin
var extractData []byte
//go:embed data/port.bin
var portData []byte
func loadEmbeddedConfig(typ string) []byte {
if typ == "spray_rule" {
return encode.MustDeflateDeCompress(sprayRuleData)
}else if typ == "spray_common" {
return encode.MustDeflateDeCompress(sprayCommonData)
}else if typ == "spray_dict" {
return encode.MustDeflateDeCompress(sprayDictData)
}else if typ == "extract" {
return encode.MustDeflateDeCompress(extractData)
}else if typ == "port" {
return encode.MustDeflateDeCompress(portData)
}
return nil
}