From 8a170435028c43cdf5aa39d01c7642cd16186b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 26 Jun 2024 11:19:27 +0800 Subject: [PATCH] Fix command output for `rule-set match` --- cmd/sing-box/cmd_rule_set_match.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/sing-box/cmd_rule_set_match.go b/cmd/sing-box/cmd_rule_set_match.go index 473c8222..08784caf 100644 --- a/cmd/sing-box/cmd_rule_set_match.go +++ b/cmd/sing-box/cmd_rule_set_match.go @@ -12,6 +12,7 @@ import ( "github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/route" E "github.com/sagernet/sing/common/exceptions" + F "github.com/sagernet/sing/common/format" "github.com/sagernet/sing/common/json" "github.com/spf13/cobra" @@ -79,7 +80,7 @@ func ruleSetMatch(sourcePath string, domain string) error { if currentRule.Match(&adapter.InboundContext{ Domain: domain, }) { - println("match rules.[", i, "]: "+currentRule.String()) + println(F.ToString("match rules.[", i, "]: ", currentRule)) } } return nil