diff --git a/internal/version/debug.go b/internal/version/debug.go deleted file mode 100644 index a2c3afab..00000000 --- a/internal/version/debug.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build debug - -package version - -func init() { - _debug = true -} diff --git a/internal/version/version.go b/internal/version/version.go index 3bb92ae6..d5951f20 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -9,8 +9,6 @@ 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 @@ -20,19 +18,8 @@ var ( GitCommit string ) -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)) - } - return fmt.Sprintf("%s-%s (debug)", Name, versionize(Version)) + return fmt.Sprintf("%s-%s", Name, strings.TrimPrefix(Version, "v")) } func BuildString() string { diff --git a/restapi/server.go b/restapi/server.go index 3db92e4c..b55462a4 100644 --- a/restapi/server.go +++ b/restapi/server.go @@ -210,7 +210,6 @@ func version(w http.ResponseWriter, r *http.Request) { render.JSON(w, r, render.M{ "version": V.Version, "commit": V.GitCommit, - "debug": V.Debug(), "modules": V.Info(), }) }