add rule.on directives "cookie", "form", "postform"

This commit is contained in:
yusing
2025-01-09 19:05:18 +08:00
parent 5769abb626
commit f5708fd539
3 changed files with 64 additions and 11 deletions

View File

@@ -3,8 +3,9 @@ package rules
import "strings"
type Help struct {
command string
args map[string]string // args[arg] -> description
command string
description string
args map[string]string // args[arg] -> description
}
/*
@@ -23,6 +24,11 @@ func (h *Help) String() string {
sb.WriteString(arg)
sb.WriteString("> ")
}
if h.description != "" {
sb.WriteString("\n\t")
sb.WriteString(h.description)
sb.WriteRune('\n')
}
sb.WriteRune('\n')
for arg, desc := range h.args {
sb.WriteRune('\t')