config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetCmd = &cobra.Command{

	Use: "get",

	Short: "print a configuration",

	Long: getLong,

	Run: func(cmd *cobra.Command, args []string) {

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'Name'")
			cmd.Usage()
			os.Exit(1)
		}

		var name string

		if 0 < len(args) {

			name = args[0]

		}

		fmt.Println("hof config get", name)

	},
}
View Source
var ListCmd = &cobra.Command{

	Use: "list",

	Short: "list configurations",

	Long: listLong,

	Run: func(cmd *cobra.Command, args []string) {

		fmt.Println("hof config list")

	},
}
View Source
var SetCmd = &cobra.Command{

	Use: "set <name> <host> <account> [project]",

	Short: "set configuration values",

	Long: setLong,

	Run: func(cmd *cobra.Command, args []string) {

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'Name'")
			cmd.Usage()
			os.Exit(1)
		}

		var name string

		if 0 < len(args) {

			name = args[0]

		}

		if 1 >= len(args) {
			fmt.Println("missing required argument: 'Host'")
			cmd.Usage()
			os.Exit(1)
		}

		var host string

		if 1 < len(args) {

			host = args[1]

		}

		if 2 >= len(args) {
			fmt.Println("missing required argument: 'Account'")
			cmd.Usage()
			os.Exit(1)
		}

		var account string

		if 2 < len(args) {

			account = args[2]

		}

		var project string

		if 3 < len(args) {

			project = args[3]

		}

		fmt.Println("hof config set", name, host, account, project)

	},
}
View Source
var TestCmd = &cobra.Command{

	Use: "test [name]",

	Short: "test your auth configuration, defaults to current",

	Long: testLong,

	Run: func(cmd *cobra.Command, args []string) {

		var name string

		if 0 < len(args) {

			name = args[0]

		}

		fmt.Println("hof config test", name)

	},
}
View Source
var UseCmd = &cobra.Command{

	Use: "use",

	Short: "set the default configuration",

	Long: useLong,

	Run: func(cmd *cobra.Command, args []string) {

		if 0 >= len(args) {
			fmt.Println("missing required argument: 'Name'")
			cmd.Usage()
			os.Exit(1)
		}

		var name string

		if 0 < len(args) {

			name = args[0]

		}

		fmt.Println("hof config use", name)

	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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