diff options
| author | adamdottv <[email protected]> | 2025-06-02 13:33:05 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-06-02 13:33:05 -0500 |
| commit | ca87b2806f4a021f78b65372a5579920c6b7619d (patch) | |
| tree | 7898a41cf0115e37ab799185c831bf193bcab262 /packages/tui/internal/version | |
| parent | 2958c6b53c293d82803b52aec5573dac24c3a9cb (diff) | |
| download | opencode-ca87b2806f4a021f78b65372a5579920c6b7619d.tar.gz opencode-ca87b2806f4a021f78b65372a5579920c6b7619d.zip | |
wip: refactoring tui
Diffstat (limited to 'packages/tui/internal/version')
| -rw-r--r-- | packages/tui/internal/version/version.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/packages/tui/internal/version/version.go b/packages/tui/internal/version/version.go deleted file mode 100644 index 69fd5282b..000000000 --- a/packages/tui/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 -} |
