Initial commit (code only without large binaries)
This commit is contained in:
34
EdgeAdmin/internal/utils/exce/excelize_test.go
Normal file
34
EdgeAdmin/internal/utils/exce/excelize_test.go
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
@Author: 1usir
|
||||
@Description:
|
||||
@File: excelize_test
|
||||
@Version: 1.0.0
|
||||
@Date: 2024/2/21 17:37
|
||||
*/
|
||||
|
||||
package exce
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestParseRule(t *testing.T) {
|
||||
f, err := os.Open("/Users/1usir/works/waf/open-waf/waf/EdgeAdmin/internal/utils/exce/WAF ALL.xlsx")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, rs, err := ParseRules(f)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, v := range rs {
|
||||
for _, arg := range v.Position {
|
||||
if arg == "{responseBody}" && v.Outbound {
|
||||
fmt.Println(v.Name, v.Type, v.Regular, v.Position, v.Inbound, v.Outbound)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user