From f3da73553c45f17e04b1e77cb13eb0fca714d1bd Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Fri, 30 May 2025 20:47:56 -0400 Subject: sync --- internal/version/version.go | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 internal/version/version.go (limited to 'internal/version') diff --git a/internal/version/version.go b/internal/version/version.go deleted file mode 100644 index 69fd5282b..000000000 --- a/internal/version/version.go +++ /dev/null @@ -1,25 +0,0 @@ -package version - -import "runtime/debug" - -// Build-time parameters set via -ldflags -var Version = "unknown" - -// A user may install pug using `go install github.com/sst/opencode@latest`. -// without -ldflags, in which case the version above is unset. As a workaround -// we use the embedded build version that *is* set when using `go install` (and -// is only set for `go install` and not for `go build`). -func init() { - info, ok := debug.ReadBuildInfo() - if !ok { - // < go v1.18 - return - } - mainVersion := info.Main.Version - if mainVersion == "" || mainVersion == "(devel)" { - // bin not built using `go install` - return - } - // bin built using `go install` - Version = mainVersion -} -- cgit v1.2.3