From 035d2abd3e6af21fb90a5b7ee1fbb085b0fcbf1e Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 31 May 2021 10:36:45 -0400 Subject: [PATCH] Properly cast inputStatus types + mark related linter false positive --- tea.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tea.go b/tea.go index 4ea4ec2..cd742c5 100644 --- a/tea.go +++ b/tea.go @@ -118,9 +118,18 @@ func WithoutRenderer() ProgramOption { type inputStatus int const ( - defaultInput = iota // generally, this will be stdin - customInput // the user explicitly set the input - managedInput // we've opened a TTY for input + // Generally this will be stdin. + // + // 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 {