cmd

package
v1.6.2-rc8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// INTMAX Max value of type int.
	INTMAX = int(^uint(0) >> 1)
)

Variables

View Source
var (
	// CheckHeight used to Sub command.
	CheckHeight = &cobra.Command{
		Use:   common.TranslateInLang(checkHeightCmdUse),
		Short: common.TranslateInLang(checkHeightCmdShorts),
		Long:  common.TranslateInLang(checkHeightCmdLongs),
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			height, err := checkDbFileHeight(args[0])
			if err != nil {
				fmt.Printf("Check db %s height err: %v\n", args[0], err)
				return err
			}
			fmt.Printf("Check db %s height: %d.\n", args[0], height)
			return nil
		},
	}
)
View Source
var (
	// MigrateDb Used to Sub command.
	MigrateDb = &cobra.Command{
		Use:   common.TranslateInLang(migrateDbCmdUse),
		Short: common.TranslateInLang(migrateDbCmdShorts),
		Long:  common.TranslateInLang(migrateDbCmdLongs),
		RunE: func(cmd *cobra.Command, args []string) error {
			return migrateDbFile()
		},
	}
)

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