|
package main
|
|
|
|
import (
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
"github.com/trashhalo/imgcat"
|
|
)
|
|
|
|
func View(image string) {
|
|
model := imgcat.NewModel([]string{image})
|
|
p := tea.NewProgram(model)
|
|
p.EnterAltScreen()
|
|
defer p.ExitAltScreen()
|
|
if err := p.Start(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|