depot/third_party/nixpkgs/pkgs/by-name/st/static-server/version.patch
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

23 lines
527 B
Diff

--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -15,7 +15,6 @@ import (
"net"
"net/http"
"os"
- "runtime/debug"
"strings"
)
@@ -50,11 +49,7 @@ func Main() int {
flags.Parse(os.Args[1:])
if *versionFlag {
- if buildInfo, ok := debug.ReadBuildInfo(); ok {
- fmt.Printf("%v %v\n", programName, buildInfo.Main.Version)
- } else {
- errorLog.Printf("version info unavailable! run 'go version -m %v'", programName)
- }
+ fmt.Printf("%v %v\n", programName, "@version@")
os.Exit(0)
}