chore: 启动参数v,查看版本同时打印使用的tags
This commit is contained in:
parent
ed9b9ce3c5
commit
298ca42369
4 changed files with 22 additions and 1 deletions
7
constant/features/no_doq.go
Normal file
7
constant/features/no_doq.go
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
//go:build no_doq
|
||||||
|
|
||||||
|
package features
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
TAGS = append(TAGS, "no_doq")
|
||||||
|
}
|
7
constant/features/no_gvisor.go
Normal file
7
constant/features/no_gvisor.go
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
//go:build no_gvisor
|
||||||
|
|
||||||
|
package features
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
TAGS = append(TAGS, "no_gvisor")
|
||||||
|
}
|
3
constant/features/tags.go
Normal file
3
constant/features/tags.go
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
package features
|
||||||
|
|
||||||
|
var TAGS = make([]string, 0, 0)
|
6
main.go
6
main.go
|
@ -3,10 +3,12 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/Dreamacro/clash/constant/features"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/Dreamacro/clash/config"
|
"github.com/Dreamacro/clash/config"
|
||||||
|
@ -50,7 +52,9 @@ func init() {
|
||||||
func main() {
|
func main() {
|
||||||
_, _ = maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
|
_, _ = maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
|
||||||
if version {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue