mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
23 lines
424 B
Go
23 lines
424 B
Go
package engine
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
"strings"
|
|
|
|
V "github.com/xjasonlyu/tun2socks/constant"
|
|
)
|
|
|
|
func showVersion() {
|
|
fmt.Print(versionString())
|
|
fmt.Print(releaseString())
|
|
}
|
|
|
|
func versionString() string {
|
|
return fmt.Sprintf("%s-%s\n", V.Name, strings.TrimPrefix(V.Version, "v"))
|
|
}
|
|
|
|
func releaseString() string {
|
|
return fmt.Sprintf("%s/%s, %s, %s\n", runtime.GOOS, runtime.GOARCH, runtime.Version(), V.GitCommit)
|
|
}
|