common

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountryByShort added in v0.15.16

func CountryByShort(short string) string

func CountryShort added in v0.15.0

func CountryShort(country string) string

func Debug added in v0.2.0

func Debug(prefix string, obj interface{}, stdout *Stdout)

func FormatBasicAuth added in v0.9.14

func FormatBasicAuth(user, pass string) string

func InterfaceToMap added in v0.6.6

func InterfaceToMap(prefix string, i interface{}) (map[string]interface{}, error)

func Invoke added in v0.15.17

func Invoke(any interface{}, name string, args ...interface{}) ([]interface{}, error)

func JsonMarshal added in v0.4.3

func JsonMarshal(t interface{}) ([]byte, error)

we need custom json marshal due to no html escaption

func Output added in v0.0.6

func Output(query, to string, prefix string, opts []interface{}, bytes []byte, stdout *Stdout)

func OutputJson added in v0.2.0

func OutputJson(outputOpts OutputOptions, prefix string, opts []interface{}, bytes []byte, stdout *Stdout)

func OutputRaw added in v0.2.0

func OutputRaw(output string, bytes []byte, stdout *Stdout)

func ReadAndMarshal added in v0.6.6

func ReadAndMarshal(input string) (map[string]interface{}, error)

func RemoveEmptyStrings added in v0.10.0

func RemoveEmptyStrings(items []string) []string

func TruncateString added in v0.2.4

func TruncateString(str string, length int) string

Types

type Country added in v0.15.0

type Country struct {
	Short   string
	Aliases []string
}

func NewCountry added in v0.15.0

func NewCountry(short string) *Country

func NewCountryWithAliases added in v0.15.0

func NewCountryWithAliases(short string, aliases []string) *Country

type Jsonata added in v0.9.2

type Jsonata struct {
	// contains filtered or unexported fields
}

func NewJsonata