Documentation ¶
Index ¶
- Variables
- func AddBundleFlags(cmd *cobra.Command)
- func Chdir() error
- func DisableConfigCheck(cmd *cobra.Command)
- func ExecuteCommand(t *testing.T, cmd *cobra.Command, in io.Reader, args ...string) (string, error)
- func GeneratedCorpusDir(projectDir, fuzzTest string) string
- func MarkFlagsRequired(cmd *cobra.Command, flags ...string)
- func NeedsConfig(cmd *cobra.Command) bool
- func ValidateSeedCorpusDirs(seedCorpusDirs []string) ([]string, error)
- func ViperMustBindPFlag(key string, flag *pflag.Flag)
- func WrapCouldBeSandboxError(err error) error
- func WrapExecError(err error, cmd *exec.Cmd) error
- func WrapIncorrectUsageError(err error) error
- func WrapSilentError(err error) error
- type CouldBeSandboxError
- type ExecError
- type IncorrectUsageError
- type SignalError
- type SilentError
Constants ¶
This section is empty.
Variables ¶
var ErrSilent = WrapSilentError(stdErrors.New("SilentError"))
Functions ¶
func AddBundleFlags ¶
AddBundleFlags adds the flags shared by the bundle and remote-run commands
func DisableConfigCheck ¶
func ExecuteCommand ¶
func GeneratedCorpusDir ¶
func MarkFlagsRequired ¶
func NeedsConfig ¶
func ValidateSeedCorpusDirs ¶
ValidateSeedCorpusDirs checks if the seed dirs exist and can be accessed and ensures that the paths are absolute
func ViperMustBindPFlag ¶
func WrapCouldBeSandboxError ¶
WrapCouldBeSandboxError wraps an existing error into a CouldBeSandboxError to hint on disabling the sandbox when the error is handled.
func WrapExecError ¶
WrapExecError wraps an existing error into an ExecError to include information about the exec.Cmd which failed in the error message.
func WrapIncorrectUsageError ¶
WrapIncorrectUsageError wraps an existing error into a IncorrectUsageError to have the usage message printed when the error is handled.
func WrapSilentError ¶
WrapSilentError wraps an existing error into a SilentError to avoid having the error message printed when the error is handled.
Types ¶
type CouldBeSandboxError ¶
type CouldBeSandboxError struct {
// contains filtered or unexported fields
}
CouldBeSandboxError indicates that the error might have been caused by the sandbox restricting access. When a CouldBeSandboxError is handled, a message should be printed which suggests to disable the sandbox if its not needed.
func (CouldBeSandboxError) Error ¶
func (e CouldBeSandboxError) Error() string
func (CouldBeSandboxError) Unwrap ¶
func (e CouldBeSandboxError) Unwrap() error
type ExecError ¶
type ExecError struct {
// contains filtered or unexported fields
}
ExecError includes information about the exec.Cmd which failed in the error message.
type IncorrectUsageError ¶
type IncorrectUsageError struct {
// contains filtered or unexported fields
}
IncorrectUsageError indicates that the command wasn't used correctly, for example because required arguments are missing. When an IncorrectUsageError is handled, the usage message should be printed.
func (IncorrectUsageError) Error ¶
func (e IncorrectUsageError) Error() string
func (IncorrectUsageError) Unwrap ¶
func (e IncorrectUsageError) Unwrap() error
type SignalError ¶
func NewSignalError ¶
func NewSignalError(signal syscall.Signal) *SignalError
func (SignalError) Error ¶
func (e SignalError) Error() string
type SilentError ¶
type SilentError struct {
// contains filtered or unexported fields
}
SilentError indicates that the error message should not be printed when the error is handled.
func (SilentError) Error ¶
func (e SilentError) Error() string
func (SilentError) Unwrap ¶
func (e SilentError) Unwrap() error