cmd

package
v0.0.0-...-7b2e207 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: AGPL-3.0, Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "ellcrys",
	Short: "Ellcrys is a smart contract execution platform built on existing, tried and trusted technologies.",
	Long:  `Ellcrys is a smart contract execution platform built on existing, tried and trusted technologies.`,

	Run: func(cmd *cobra.Command, args []string) {
		showVersion, _ := cmd.Flags().GetBool("version")
		if showVersion {
			fmt.Println("Cocoon version 0.5.0")
			return
		}
		fmt.Println(cmd.Long)
		fmt.Println("")
		cmd.Usage()
	},
}

RootCmd represents the base command when called without any subcommands

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.

func UsageError

func UsageError(l *logging.Logger, cmd *cobra.Command, msg, helpCmd string)

UsageError displays Usage error

func UsageError2

func UsageError2(l *logging.Logger, cmd *cobra.Command, msg, helpCmd string)

UsageError2 displays simple Usage error

Types

This section is empty.

Jump to

Keyboard shortcuts

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