Documentation
¶
Index ¶
- func AbiDecodeString(bz []byte) (string, error)
- func AbiEncodeString(str string) ([]byte, error)
- func BeautifyJson(bzJson []byte) ([]byte, error)
- func ConvertDisplayWithExponentIntoRaw(display string, exponent int, decimalsPoint rune) (number, highNumber, lowNumber *big.Int, err error)
- func ConvertNumberIntoDisplayWithExponent(number *big.Int, exponent int) (display string, highNumber, lowNumber *big.Int, err error)
- func ExitOnErr(err error, msg string)
- func GetGroupsOfUser(username string) ([]string, error)
- func GetOperationUserInfo() (operationUserInfo *types.OperationUserInfo, err error)
- func HasBinaryName(binaryName string) bool
- func IsDarwin() bool
- func IsLinux() bool
- func IsSuperUser(username string) (isSuperUser bool, err error)
- func ProvidedArgsOrFromPipe(providedArgs []string) (outputArgs []string, err error)
- func RequireArgs(args []string, cmd *cobra.Command)
- func RequireExactArgsCount(args []string, want int, cmd *cobra.Command)
- func TryPrintBeautyJson(bz []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbiDecodeString ¶
func AbiEncodeString ¶
func BeautifyJson ¶
BeautifyJson beautifies the given json.
func ConvertDisplayWithExponentIntoRaw ¶ added in v1.4.0
func ConvertNumberIntoDisplayWithExponent ¶ added in v1.4.0
func ExitOnErr ¶ added in v1.4.0
ExitOnErr exit the app with code 1 if error. Or does nothing if no error.
func GetGroupsOfUser ¶
func GetOperationUserInfo ¶
func GetOperationUserInfo() (operationUserInfo *types.OperationUserInfo, err error)
func HasBinaryName ¶
func IsSuperUser ¶
func ProvidedArgsOrFromPipe ¶ added in v1.4.0
ProvidedArgsOrFromPipe will prioritize provided args, if not provided, it will try to read from pipe.
func RequireArgs ¶ added in v1.4.0
RequireArgs will exit program if no arg provided.
func RequireExactArgsCount ¶ added in v1.4.0
RequireExactArgsCount will exit program if number of arguments is not equal to want.
func TryPrintBeautyJson ¶ added in v1.4.0
func TryPrintBeautyJson(bz []byte)
TryPrintBeautyJson tries to beautify the given json and print it. If failed to beautify, it will print the original json.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.