mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-19 15:14:56 +08:00
Chore: minor refactor
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
const Name = "tun2socks"
|
||||
|
||||
var (
|
||||
_debug = false
|
||||
|
||||
// Version can be set at link time by executing
|
||||
// the command: `git describe --abbrev=0 --tags HEAD`
|
||||
Version string
|
||||
@@ -22,6 +24,10 @@ func versionize(s string) string {
|
||||
return strings.TrimPrefix(s, "v")
|
||||
}
|
||||
|
||||
func Debug() bool {
|
||||
return _debug
|
||||
}
|
||||
|
||||
func String() string {
|
||||
if !Debug() {
|
||||
return fmt.Sprintf("%s-%s", Name, versionize(Version))
|
||||
|
Reference in New Issue
Block a user