Debian Codegraph @

examples/filepicker-picking/main.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5
6 "github.com/charmbracelet/huh"
7 )
8
9 func main() {
10 var file string
11 huh.NewForm(
12 huh.NewGroup(
13 huh.NewFilePicker().
14 Picking(true).
15 Title("Code").
16 Description("Select a .go file").
17 AllowedTypes([]string{".go"}).
18 Value(&file),
19 ),
20 ).WithShowHelp(true).Run()
21 fmt.Println(file)
22 }