Documentation ¶
Overview ¶
Package utils provides utilities functions.
Index ¶
- func BoolToYN(b bool) string
- func ErrorfOrEmpty(msg string, err error) string
- func FormatErrorfOrEmpty(format string, err error, va ...any) string
- func FormatLabels(labels []metaschedulerabi.Label) []string
- func GetPrivateKey(ethHexPK, orPath string) (*ecdsa.PrivateKey, error)
- func StringsToLabels(input string) ([]types.Label, error)
- func YNToBool(b string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorfOrEmpty ¶
ErrorfOrEmpty returns a message if the error is not nil.
func FormatErrorfOrEmpty ¶
FormatErrorfOrEmpty returns a formatted message if the error is not nil.
func FormatLabels ¶
func FormatLabels(labels []metaschedulerabi.Label) []string
FormatLabels formats labels into a slice of "key: value".
func GetPrivateKey ¶ added in v1.4.0
func GetPrivateKey(ethHexPK, orPath string) (*ecdsa.PrivateKey, error)
GetPrivateKey fetch or generates an ethereum private key.
func StringsToLabels ¶
StringsToLabels converts a "key=value,key2=value2" into a slice of labels.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.