Documentation
¶
Index ¶
Constants ¶
View Source
const (
DebugEnvVar string = "NUON_DEBUG"
)
View Source
const NoTTYEnvVar string = "NUON_NO_TTY"
View Source
const PreviewEnvVar string = "NUON_PREVIEW"
Variables ¶
This section is empty.
Functions ¶
func IsInteractive ¶ added in v0.19.807
func IsInteractive() bool
IsInteractive returns true if the CLI should use interactive TUI mode. It checks (in priority order):
- NUON_NO_TTY=true → non-interactive (explicit user override)
- CI env var is set → non-interactive (standard CI convention)
- stdout is not a terminal → non-interactive (pipe, redirect, cron)
- Otherwise → interactive
Types ¶
type Config ¶
type Config struct {
*viper.Viper
APIToken string `mapstructure:"api_token"`
APIURL string `mapstructure:"api_url"`
OrgID string `mapstructure:"org_id"`
InstallID string `mapstructure:"install_id"`
AppID string `mapstructure:"app_id"`
WorkflowID string `mapstructure:"workflow_id"`
DisableTelemetry bool `mapstructure:"disable_telemetry"`
Debug bool `mapstructure:"debug"`
Preview bool `mapstructure:"preview"`
Interactive bool `mapstructure:"-"`
// internal configuration, not designed to be used by users
GitHubAppName string `mapstructure:"github_app_name"`
Env string `mapstructure:"-"`
CleanupTimeout time.Duration `mapstructure:"-"`
SegmentWriteKey string `mapstructure:"-"`
SentryDSN string `mapstructure:"-"`
UserID string `mapstructure:"-"`
}
config holds config values, read from the `~/.nuon` config file and env vars.
func (*Config) BindCobraFlags ¶
BindCobraFlags binds config values to the flags of the provided cobra command.
Click to show internal directories.
Click to hide internal directories.