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 }