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