forked from google/go-licenses
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
- Loading branch information
1 parent
9c73a9e
commit 80804a3
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ui | ||
|
||
import ( | ||
"github.com/khulnasoft/go-pulsebus" | ||
) | ||
|
||
type UI func(<-chan error, *pulsebus.Subscription) error | ||
|
||
// Select is responsible for determining the specific UI function given select user option, the current platform | ||
// config values, and environment status (such as a TTY being present). | ||
func Select() UI { | ||
// verbose, quiet bool | ||
var ui UI | ||
|
||
//isStdoutATty := terminal.IsTerminal(int(os.Stdout.Fd())) | ||
//isStderrATty := terminal.IsTerminal(int(os.Stderr.Fd())) | ||
//notATerminal := !isStderrATty && !isStdoutATty | ||
|
||
switch { | ||
//case runtime.GOOS == "windows" || verbose || quiet || notATerminal || !isStderrATty: | ||
// ui = logger | ||
default: | ||
ui = etui | ||
//ui = nop | ||
} | ||
|
||
return ui | ||
} |