util

package
v0.30.1 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: 8 Imported by: 1

Documentation

Overview

Package cli defines constants, configurations, and utilities that are used across the Flow CLI.

Index

Constants

View Source
const (
	EnvPrefix = "FLOW"
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(s []string, e string) bool

ContainsString returns true if the slice contains the given string.

func ConvertSigAndHashAlgo

func ConvertSigAndHashAlgo(
	signatureAlgorithm string,
	hashingAlgorithm string,
) (crypto.SignatureAlgorithm, crypto.HashAlgorithm, error)

ConvertSigAndHashAlgo parses and validates a signature and hash algorithm pair.

func CreateTabWriter

func CreateTabWriter(b *bytes.Buffer) *tabwriter.Writer

func EnvFromNetwork

func EnvFromNetwork(network flow.ChainID) templates.Environment

func Exit

func Exit(code int, msg string)

func GetAddressNetwork

func GetAddressNetwork(address flow.Address) (flow.ChainID, error)

GetAddressNetwork returns the chain ID for an address.

func ParseAddress

func ParseAddress(value string) (flow.Address, bool)

func RandomSeed

func RandomSeed(n int) ([]byte, error)

func RemoveFromStringArray

func RemoveFromStringArray(s []string, el string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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