Debian Codegraph @

examples/readme/text/main.go

raw symbols SCIP
1 package main
2
3 import "github.com/charmbracelet/huh"
4
5 // TODO: ensure input is not plagiarized.
6 func checkForPlagiarism(s string) error { return nil }
7
8 func main() {
9 var story string
10
11 text := huh.NewText().
12 Title("Tell me a story.").
13 Validate(checkForPlagiarism).
14 Placeholder("What's on your mind?").
15 Value(&story)
16
17 // Create a form to show help.
18 form := huh.NewForm(huh.NewGroup(text))
19 form.Run()
20 }