diff options
| author | Priyansh <[email protected]> | 2025-08-27 14:57:20 +0530 |
|---|---|---|
| committer | Priyansh <[email protected]> | 2025-08-27 14:57:20 +0530 |
| commit | 40c2e698448c7f1af531d1474cf66c4a07f6c3ed (patch) | |
| tree | 7fe0258c746c83462d5c1cb003ea35161f877723 | |
| parent | 590812232f19a4276856b23ff1aa5a8b11522fbc (diff) | |
| download | nectar-40c2e698448c7f1af531d1474cf66c4a07f6c3ed.tar.xz nectar-40c2e698448c7f1af531d1474cf66c4a07f6c3ed.zip | |
Add version and build date to globals
| -rw-r--r-- | screens/screens.go | 8 | ||||
| -rw-r--r-- | screens/types.go | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/screens/screens.go b/screens/screens.go index 77197ca..5e087b8 100644 --- a/screens/screens.go +++ b/screens/screens.go @@ -1,6 +1,7 @@ package screens import ( + "nectar/build" "os" tea "github.com/charmbracelet/bubbletea" @@ -53,7 +54,12 @@ func Start() tea.Model { height = 24 } - globals = Globals{width: width, height: height} + globals = Globals{ + width: width, + height: height, + buildDate: build.Date, + version: build.Version, + } return &ScreenManager{currentScreen: _root()} } diff --git a/screens/types.go b/screens/types.go index 1d89809..99541c4 100644 --- a/screens/types.go +++ b/screens/types.go @@ -1,6 +1,8 @@ package screens type Globals struct { - width int - height int + width int + height int + buildDate string + version string } |
