version

package
v0.34.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 4,509

Documentation

Overview

nolint

Index

Constants

This section is empty.

Variables

View Source
var (
	Commit        = ""
	Version       = ""
	VendorDirHash = ""
	BuildTags     = ""
)

Variables set by build flags

View Source
var (

	// VersionCmd prints out the current sdk version
	VersionCmd = &cobra.Command{
		Use:   "version",
		Short: "Print the app version",
		RunE: func(_ *cobra.Command, _ []string) error {
			verInfo := newVersionInfo()

			if !viper.GetBool(flagLong) {
				fmt.Println(verInfo.CosmosSDK)
				return nil
			}

			if viper.GetString(cli.OutputFlag) != "json" {
				fmt.Print(verInfo)
				return nil
			}

			bz, err := json.Marshal(verInfo)
			if err != nil {
				return err
			}
			fmt.Println(string(bz))
			return nil
		},
	}
)

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