cmd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgValidatorAssetOrP

func ArgValidatorAssetOrP(cmd *cobra.Command, arg string) error

ArgValidatorAssetAndAll checks for valid asset or 'all'

func ArgValidatorECAddress added in v0.2.1

func ArgValidatorECAddress(cmd *cobra.Command, arg string) error

ArgValidatorECAddress checks for EC address

func ArgValidatorFCTAddress added in v0.2.1

func ArgValidatorFCTAddress(cmd *cobra.Command, arg string) error

ArgValidatorFCTAddress checks for FCT address

func ArgValidatorFCTAmount added in v0.2.1

func ArgValidatorFCTAmount(cmd *cobra.Command, arg string) error

func CombineCobraArgs added in v0.2.1

func CombineCobraArgs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs

CombineCobraArgs allows the combination of multiple PositionalArgs

func CustomArgOrderValidationBuilder added in v0.2.1

func CustomArgOrderValidationBuilder(strict bool, valids ...func(cmd *cobra.Command, args string) error) cobra.PositionalArgs

CustomArgOrderValidationBuilder return an arg validator. The arg validator will validate cli arguments based on the validation functions provided in the order of the validation functions.

Params:
	strict		Enforce the number of args == number of validation funcs
	valids		Validation functions

func Execute

func Execute()

Execute is cobra's entry point

func FactoidToFactoshi

func FactoidToFactoshi(amt string) (uint64, error)

FactoidToFactoshi is taken from the factom lib, but errors when extra decimals provided

func FactoshiToFactoid

func FactoshiToFactoid(i int64) string

FactoshiToFactoid converts a uint64 factoshi ammount into a fixed point number represented as a string

func ReadConfig

func ReadConfig(cmd *cobra.Command, args []string)

ReadConfig can be put as a PreRun for a command that uses the config file

func SoftReadConfig

func SoftReadConfig(cmd *cobra.Command, args []string)

SoftReadConfig will not fail. It can be used for a command that needs the config, but is happy with the defaults

Types

This section is empty.

Jump to

Keyboard shortcuts

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