mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-17 10:35:28 -07:00
Properly cast inputStatus types + mark related linter false positive
This commit is contained in:
15
tea.go
15
tea.go
@@ -118,9 +118,18 @@ func WithoutRenderer() ProgramOption {
|
|||||||
type inputStatus int
|
type inputStatus int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultInput = iota // generally, this will be stdin
|
// Generally this will be stdin.
|
||||||
customInput // the user explicitly set the input
|
//
|
||||||
managedInput // we've opened a TTY for input
|
// Lint ignore note: this is the implicit default value. While it's not
|
||||||
|
// checked explicitly, it's presence nullifies the other possible values
|
||||||
|
// of this type in logical statements.
|
||||||
|
defaultInput inputStatus = iota // nolint:golint,deadcode,unused,varcheck
|
||||||
|
|
||||||
|
// The user explicitly set the input.
|
||||||
|
customInput
|
||||||
|
|
||||||
|
// We've opened a TTY for input.
|
||||||
|
managedInput
|
||||||
)
|
)
|
||||||
|
|
||||||
func (i inputStatus) String() string {
|
func (i inputStatus) String() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user