commands

package
v0.0.0-...-f137246 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 25 Imported by: 1

Documentation

Overview

Package commands defines and implements command-line commands and flags used by devopsdays-cli. Commands and flags are implemented using Cobra.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the current version of the devopsdays-cli tool. Unless set elsewhere, it is referred to as "master"
	Version = "master"
	// Build is the current build of the devopsdays-cli tool.
	// @todo The Build variable in cmd/version.go needs to be set somewhere.
	Build string
)
View Source
var All bool

All is used by a flag on Show commands to represent showing all of a thing

View Source
var City string

City is the city we will be using - obtained via local flag

View Source
var Debug bool

Debug means should we run in debug mode. Duh.

View Source
var RootCmd = &cobra.Command{
	Use:   "devopsdays-cli",
	Short: "Run maintenance tasks for the devopsdays.org website",
	Long: `
Command-line utilities for the devopsdays.org website
built with love by mattstratton in Go.

Complete documentation is available at https://github.com/devopsdays/devopsdays-cli`,
	Run: func(cmd *cobra.Command, args []string) {
		mainPrompt()
	},
}

RootCmd represents the base command when called without any subcommands

View Source
var Year string

Year is the year we will be using - obtained via local flag

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Theme

type Theme struct {
	Version string `toml:"theme_version"`
}

Theme represents the currently installed devopsdays-theme Hugo theme. The field Version represents the current version.

Jump to

Keyboard shortcuts

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