From 14c9ee8b4d42a0b2f3f5c868b35ae154810bb494 Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Sat, 10 Feb 2024 22:23:15 -0600 Subject: [PATCH] adjust bubble tea mod --- go.mod | 4 ++-- options.go | 6 ++++++ renderer.go | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 04ee57b..dbaae35 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/charmbracelet/bubbletea +module git.preston-baxter.com/Preston_PLB/bubbletea -go 1.18 +go 1.21 require ( github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 diff --git a/options.go b/options.go index e78a048..cbebfd0 100644 --- a/options.go +++ b/options.go @@ -223,3 +223,9 @@ func WithFPS(fps int) ProgramOption { p.fps = fps } } + +func WithRenderer(renderer Renderer) ProgramOption { + return func(p *Program) { + p.renderer = renderer + } +} diff --git a/renderer.go b/renderer.go index 65c2ae6..53dd511 100644 --- a/renderer.go +++ b/renderer.go @@ -1,5 +1,9 @@ package tea +type Renderer interface { + renderer +} + // renderer is the interface for Bubble Tea renderers. type renderer interface { // Start the renderer.