mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
25 lines
674 B
Go
25 lines
674 B
Go
package firewallconfigs_test
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestRuleOperator_Markdown(t *testing.T) {
|
|
var result = []string{}
|
|
for _, def := range firewallconfigs.AllRuleOperators {
|
|
def.Description = strings.ReplaceAll(def.Description, "<code-label>", "`")
|
|
def.Description = strings.ReplaceAll(def.Description, "</code-label>", "`")
|
|
|
|
var row = "## " + def.Name + "\n"
|
|
row += "* 名称:" + def.Name + "\n"
|
|
row += "* 代号:`" + def.Code + "`\n"
|
|
row += "* 描述:" + def.Description + "\n"
|
|
result = append(result, row)
|
|
}
|
|
|
|
fmt.Print(strings.Join(result, "\n") + "\n")
|
|
}
|