Back to godoc.org

Package version

v0.33.0-pool
Latest Go to latest

The highest tagged major version is .

Published: Apr 18, 2019 | License: Apache-2.0 | Module: git.ethfans.org/weishuyu/cosmos-for-pool

Overview

nolint

Index

Variables

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

Variables set by build flags

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
		},
	}
)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier