Documentation ¶
Index ¶
- func NewTestConfigFn(cfgFile string, logFile string) func() *TestConfig
- type Command
- type SetupCommand
- type TestCommandHarness
- type TestConfig
- func (c *TestConfig) DefaultConfigDir() (string, error)
- func (c *TestConfig) DefaultConfigFile() string
- func (c *TestConfig) DefaultLogDir() (string, error)
- func (c *TestConfig) DefaultLogFile() string
- func (c *TestConfig) GetConfigFile() string
- func (c *TestConfig) GetLogFile() string
- func (_ *TestConfig) GlobalRequiredFlags(cmd *cobra.Command) error
- func (_ *TestConfig) RootPersistentFlags(flags *pflag.FlagSet)
- func (c *TestConfig) SetConfigFile(cfg string)
- func (c *TestConfig) SetLogFile(l string)
- func (_ *TestConfig) Validate() error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestConfigFn ¶ added in v0.2.1
func NewTestConfigFn(cfgFile string, logFile string) func() *TestConfig
Types ¶
type SetupCommand ¶
type TestCommandHarness ¶ added in v0.2.1
type TestCommandHarness struct {
// contains filtered or unexported fields
}
func NewTestCommandHarness ¶ added in v0.2.1
func NewTestCommandHarness(t *testing.T, fn testCommandFn) *TestCommandHarness
func (*TestCommandHarness) Execute ¶ added in v0.2.1
func (h *TestCommandHarness) Execute(ctx context.Context, args []string) int
func (*TestCommandHarness) Stderr ¶ added in v0.2.1
func (h *TestCommandHarness) Stderr() string
func (*TestCommandHarness) Stdout ¶ added in v0.2.1
func (h *TestCommandHarness) Stdout() string
type TestConfig ¶ added in v0.2.1
type TestConfig struct { // Common configuration values. Format string Debug bool NoColor bool `mapstructure:"no-color"` // contains filtered or unexported fields }
func (*TestConfig) DefaultConfigDir ¶ added in v0.2.1
func (c *TestConfig) DefaultConfigDir() (string, error)
func (*TestConfig) DefaultConfigFile ¶ added in v0.2.1
func (c *TestConfig) DefaultConfigFile() string
func (*TestConfig) DefaultLogDir ¶ added in v0.2.1
func (c *TestConfig) DefaultLogDir() (string, error)
func (*TestConfig) DefaultLogFile ¶ added in v0.2.1
func (c *TestConfig) DefaultLogFile() string
func (*TestConfig) GetConfigFile ¶ added in v0.2.1
func (c *TestConfig) GetConfigFile() string
func (*TestConfig) GetLogFile ¶ added in v0.2.1
func (c *TestConfig) GetLogFile() string
func (*TestConfig) GlobalRequiredFlags ¶ added in v0.2.1
func (_ *TestConfig) GlobalRequiredFlags(cmd *cobra.Command) error
func (*TestConfig) RootPersistentFlags ¶ added in v0.2.1
func (_ *TestConfig) RootPersistentFlags(flags *pflag.FlagSet)
func (*TestConfig) SetConfigFile ¶ added in v0.2.1
func (c *TestConfig) SetConfigFile(cfg string)
func (*TestConfig) SetLogFile ¶ added in v0.2.1
func (c *TestConfig) SetLogFile(l string)
func (*TestConfig) Validate ¶ added in v0.2.1
func (_ *TestConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.