docs(parsing): add package and symbol doc comments

Add godoc comments for all 62 exported symbols across 20 files in
config/parsing/: 23 MDKey constants, 35 Parse*/List/Default* functions,
3 TLS helpers, 1 Args struct with 7 fields, and the package doc.
This commit is contained in:
ginuerzh
2026-05-24 13:58:37 +08:00
parent 2b1e4ca3a7
commit effba3b690
20 changed files with 203 additions and 21 deletions
+5
View File
@@ -14,6 +14,9 @@ import (
"github.com/go-gost/x/registry"
)
// ParseBypass converts a BypassConfig into a bypass.Bypass. It resolves plugin
// backends (HTTP or gRPC) when cfg.Plugin is set, or constructs an in-process
// bypass with optional file, Redis, and HTTP hot-reload support.
func ParseBypass(cfg *config.BypassConfig) bypass.Bypass {
if cfg == nil {
return nil
@@ -74,6 +77,8 @@ func ParseBypass(cfg *config.BypassConfig) bypass.Bypass {
return xbypass.NewBypass(opts...)
}
// List resolves one or more bypass names from the registry. It returns only
// the bypasses that were found, skipping any that are not registered.
func List(name string, names ...string) []bypass.Bypass {
var bypasses []bypass.Bypass
if bp := registry.BypassRegistry().Get(name); bp != nil {