From 298ca42369366cff797f5fd3ab085b9e4825b43a Mon Sep 17 00:00:00 2001 From: Skyxim Date: Fri, 3 Jun 2022 20:23:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0v?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E7=9C=8B=E7=89=88=E6=9C=AC=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=BD=BF=E7=94=A8=E7=9A=84tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constant/features/no_doq.go | 7 +++++++ constant/features/no_gvisor.go | 7 +++++++ constant/features/tags.go | 3 +++ main.go | 6 +++++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 constant/features/no_doq.go create mode 100644 constant/features/no_gvisor.go create mode 100644 constant/features/tags.go diff --git a/constant/features/no_doq.go b/constant/features/no_doq.go new file mode 100644 index 00000000..c915272f --- /dev/null +++ b/constant/features/no_doq.go @@ -0,0 +1,7 @@ +//go:build no_doq + +package features + +func init() { + TAGS = append(TAGS, "no_doq") +} diff --git a/constant/features/no_gvisor.go b/constant/features/no_gvisor.go new file mode 100644 index 00000000..d0d5391a --- /dev/null +++ b/constant/features/no_gvisor.go @@ -0,0 +1,7 @@ +//go:build no_gvisor + +package features + +func init() { + TAGS = append(TAGS, "no_gvisor") +} diff --git a/constant/features/tags.go b/constant/features/tags.go new file mode 100644 index 00000000..c81f6d4e --- /dev/null +++ b/constant/features/tags.go @@ -0,0 +1,3 @@ +package features + +var TAGS = make([]string, 0, 0) diff --git a/main.go b/main.go index 10f4307b..7b128e2d 100644 --- a/main.go +++ b/main.go @@ -3,10 +3,12 @@ package main import ( "flag" "fmt" + "github.com/Dreamacro/clash/constant/features" "os" "os/signal" "path/filepath" "runtime" + "strings" "syscall" "github.com/Dreamacro/clash/config" @@ -50,7 +52,9 @@ func init() { func main() { _, _ = maxprocs.Set(maxprocs.Logger(func(string, ...any) {})) if version { - fmt.Printf("Clash Meta %s %s %s with %s %s\n", C.Version, runtime.GOOS, runtime.GOARCH, runtime.Version(), C.BuildTime) + fmt.Printf("Clash Meta %s %s %s with %s %s\n", + C.Version, runtime.GOOS, runtime.GOARCH, runtime.Version(), C.BuildTime) + fmt.Printf("Use tags: %s\n", strings.Join(features.TAGS, ", ")) return }