cmd

package
v3.0.11+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "3.0.11"

Version is the version of the current build. It follows semantic versioning.

Variables

View Source
var (
	// BinaryName is the name of the app.
	// By default this is exercism, but people
	// are free to name this however they want.
	// The usage examples and help strings should reflect
	// the actual name of the binary.
	BinaryName string
	// Out is used to write to information.
	Out io.Writer
	// Err is used to write errors.
	Err io.Writer
	// In is used to provide mocked test input (i.e. for prompts).
	In io.Reader
)
View Source
var RootCmd = &cobra.Command{
	Use:   BinaryName,
	Short: "A friendly command-line interface to Exercism.",
	Long: `A command-line interface for the v2 redesign of Exercism.

Download exercises and submit your solutions.`,
	SilenceUsage: true,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		if verbose, _ := cmd.Flags().GetBool("verbose"); verbose {
			debug.Verbose = verbose
		}
		if timeout, _ := cmd.Flags().GetInt("timeout"); timeout > 0 {
			cli.TimeoutInSeconds = timeout
			api.TimeoutInSeconds = timeout
		}
	},
}

RootCmd represents the base command when called without any subcommands.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command.

Types

type Status

type Status struct {
	Censor          bool
	Version         versionStatus
	System          systemStatus
	Configuration   configurationStatus
	APIReachability apiReachabilityStatus
	// contains filtered or unexported fields
}

Status represents the results of a CLI self test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL