Documentation
¶
Index ¶
- Variables
- func CompareVersions(v1, v2 string) int
- func ConvertToRawGitHubURL(inputURL string) (string, error)
- func FlagErrorWrap(err error) error
- func FlagErrorf(format string, args ...interface{}) error
- func GetOsInfo() map[string]string
- func GetSubcommandNames(cmd *cobra.Command) []string
- func IsUserCancellation(err error) bool
- func MutuallyExclusive(message string, conditions ...bool) error
- func PrintCombinedStats(iostream *iostreams.IOStreams, stats []*Stats)
- func PrintWelcomeMessage(iostream *iostreams.IOStreams, version string)
- type ConfigureItem
- type FlagError
- type NoResultsError
- type RealUserUtils
- type Stats
- type StatsCollector
- type Tool
- type ToolConfig
- type UserUtils
Constants ¶
This section is empty.
Variables ¶
var CancelError = errors.New("CancelError")
CancelError signals user-initiated cancellation.
var ConfigNotFoundError = errors.New("Config file not found")
var PendingError = errors.New("PendingError")
PendingError signals nothing failed but something is pending.
var SilentError = errors.New("SilentError")
SilentError is an error that triggers exit code 1 without any error messaging.
Functions ¶
func CompareVersions ¶ added in v0.1.0
CompareVersions compares two version strings. It returns:
-1 if v1 < v2 0 if v1 == v2 1 if v1 > v2
func ConvertToRawGitHubURL ¶
func FlagErrorWrap ¶
FlagError returns a new FlagError that wraps the specified error.
func FlagErrorf ¶
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
func GetSubcommandNames ¶
func IsUserCancellation ¶
func MutuallyExclusive ¶
func PrintCombinedStats ¶ added in v0.1.2
func PrintWelcomeMessage ¶
Types ¶
type ConfigureItem ¶
type FlagError ¶
type FlagError struct {
// contains filtered or unexported fields
}
A *FlagError indicates an error processing command-line flags or other arguments. Such errors cause the application to display the usage message.
type NoResultsError ¶
type NoResultsError struct {
// contains filtered or unexported fields
}
func NewNoResultsError ¶
func NewNoResultsError(message string) NoResultsError
func (NoResultsError) Error ¶
func (e NoResultsError) Error() string
type RealUserUtils ¶
type RealUserUtils struct{}
func (RealUserUtils) GetCurrentUser ¶
func (RealUserUtils) GetCurrentUser() (*user.User, error)
type StatsCollector ¶ added in v0.1.2
type StatsCollector struct {
// contains filtered or unexported fields
}
func NewStatsCollector ¶ added in v0.1.2
func NewStatsCollector() *StatsCollector
func (*StatsCollector) AddStat ¶ added in v0.1.2
func (sc *StatsCollector) AddStat(stat *Stats)
func (*StatsCollector) GetStats ¶ added in v0.1.2
func (sc *StatsCollector) GetStats() []*Stats
type ToolConfig ¶
type ToolConfig struct { Tools []Tool `yaml:"tools"` Configure []ConfigureItem `yaml:"configure"` }
func LoadToolsConfig ¶
func LoadToolsConfig(filename string) (*ToolConfig, error)
LoadToolsConfig loads tool configuration from a YAML file.
func (*ToolConfig) GetConfigureItem ¶
func (tc *ToolConfig) GetConfigureItem(name string) (*ConfigureItem, error)
GetConfigureItem retrieves a specific configuration item by name.