Debian Codegraph @

examples/bubbletea-options/main.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5
6 tea "github.com/charmbracelet/bubbletea"
7 "github.com/charmbracelet/huh"
8 )
9
10 func main() {
11 var name string
12 form := huh.NewForm(
13 huh.NewGroup(huh.NewInput().Description("What should we call you?").Value(&name)),
14 ).WithProgramOptions(tea.WithAltScreen())
15
16 err := form.Run()
17 if err != nil {
18 fmt.Println("error:", err)
19 }
20
21 fmt.Println("Welcome, " + name + "!")
22 }