gum/input/options.go
Christian Muehlhaeuser 66993d8ef1
Add soft & hard linter configs & workflows (#44)
* chore: add linter configs & workflows

* fix: ignore certain linter warnings

* fix: mark errors as intentionally ignored

* fix: avoid unnecessary conversion

* fix: handle template/renderer errors

* fix: mark intentionally unused code
2022-07-30 12:32:59 -04:00

16 lines
705 B
Go

package input
import "github.com/charmbracelet/gum/style"
// Options are the customization options for the input.
// nolint:staticcheck
type Options struct {
Placeholder string `help:"Placeholder value" default:"Type something..."`
Prompt string `help:"Prompt to display" default:"> "`
PromptStyle style.Styles `embed:"" prefix:"prompt." set:"name=prompt"`
CursorStyle style.Styles `embed:"" prefix:"cursor." set:"defaultForeground=212" set:"name=cursor"`
Value string `help:"Initial value (can also be passed via stdin)" default:""`
Width int `help:"Input width" default:"40"`
Password bool `help:"Mask input characters" default:"false"`
}