Documentation
¶
Index ¶
- func AnyEquals[T comparable](list []T, value T) bool
- func BeginsWith(subject, find string) bool
- func CreateTempFile(content []byte) (string, error)
- func EndsWith(subject, find string) bool
- func ExtractHeadersFromText(fileContent []byte) map[string]string
- func ExtractNumbersFromString(str string) (int, error)
- func FilterLines(text string, filterFunc func(line string) bool) string
- func GetFreePort() int
- func GetKeys[T_Key comparable, T_Value interface{}](subject map[T_Key]T_Value) []T_Key
- func GetSortedKeys[T interface{}](subject map[string]T) []string
- func GetWord(index int, str, fallback string) string
- func HasHeaderWithValue(headers *http.Header, headerKeyToSearch, headerValueToSearch string) bool
- func HasText(text string) bool
- func IndexOf[T comparable](list []T, value T) int
- func IsPortFree(portNumber int) bool
- func JoinMap[K comparable, V comparable](mapDst map[K]V, mapSrc map[K]V)
- func ListsEqual[T comparable](listA []T, listB []T) bool
- func ListsEqualUnsorted[T comparable](listA, listB []T) bool
- func MapContains[K comparable, V comparable](m map[K]V, key K, value V) bool
- func MapContainsX[K comparable, V comparable](m map[K]V, key K, value, fallback V) (bool, bool, V)
- func MapFilterFileLines(filePath string, f func(string) (string, bool)) error
- func MapGetKeyByValue[K comparable, V comparable](m map[K]V, search V, fallback K) K
- func MapMapValueOnly[T_Key comparable, T_Value comparable, T_ValueB interface{}](subject map[T_Key]T_Value, transform func(value T_Value) T_ValueB) map[T_Key]T_ValueB
- func MarshalJsonHelper[T comparable](mapValues map[T]string, errorMessage string, value *T) ([]byte, error)
- func MktempDir() (string, error)
- func ParseEnv(env map[string]string) []string
- func ParseHeaderLine(text string) (string, string, bool)
- func RegexTest(regex string, subject string) bool
- func RemoveEmptyLines(text string) string
- func ReplaceRegex(subject string, find []string, replaceWith string) string
- func ReplaceVars(text string, vars map[string]string, ...) string
- func ToCommandParams(commandSplit []string) (string, []string)
- func ToCommandStrings(command string) []string
- func ToDolarSignVariablePlaceHolder(varName string) string
- func ToDolarSignWithWrapVariablePlaceHolder(varName string) string
- func ToHeadersText(headers http.Header) string
- func UnmarshalJsonHelper[T comparable](value *T, mapValues map[T]string, data []byte, errorMessage string) error
- func Unquote(subject string) string
- func WrapIn(wrapper string) func(subject string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyEquals ¶
func AnyEquals[T comparable](list []T, value T) bool
func BeginsWith ¶
func CreateTempFile ¶ added in v0.2.0
func ExtractHeadersFromText ¶ added in v1.0.0
func ExtractNumbersFromString ¶ added in v0.8.0
func FilterLines ¶ added in v0.2.0
func GetFreePort ¶ added in v1.3.1
func GetFreePort() int
func GetKeys ¶ added in v0.0.2
func GetKeys[T_Key comparable, T_Value interface{}](subject map[T_Key]T_Value) []T_Key
func GetSortedKeys ¶ added in v0.1.1
func HasHeaderWithValue ¶
func IndexOf ¶ added in v0.0.2
func IndexOf[T comparable](list []T, value T) int
func IsPortFree ¶ added in v1.3.1
func JoinMap ¶
func JoinMap[K comparable, V comparable](mapDst map[K]V, mapSrc map[K]V)
func ListsEqual ¶
func ListsEqual[T comparable](listA []T, listB []T) bool
func ListsEqualUnsorted ¶ added in v0.0.2
func ListsEqualUnsorted[T comparable](listA, listB []T) bool
func MapContains ¶
func MapContains[K comparable, V comparable](m map[K]V, key K, value V) bool
func MapContainsX ¶ added in v0.8.1
func MapContainsX[K comparable, V comparable](m map[K]V, key K, value, fallback V) (bool, bool, V)
func MapFilterFileLines ¶ added in v1.4.2
func MapGetKeyByValue ¶ added in v1.0.0
func MapGetKeyByValue[K comparable, V comparable](m map[K]V, search V, fallback K) K
func MapMapValueOnly ¶ added in v0.0.2
func MapMapValueOnly[T_Key comparable, T_Value comparable, T_ValueB interface{}]( subject map[T_Key]T_Value, transform func(value T_Value) T_ValueB, ) map[T_Key]T_ValueB
func MarshalJsonHelper ¶ added in v0.0.2
func MarshalJsonHelper[T comparable]( mapValues map[T]string, errorMessage string, value *T, ) ([]byte, error)
func RemoveEmptyLines ¶ added in v0.2.0
func ReplaceVars ¶ added in v0.4.0
func ToCommandParams ¶ added in v0.2.0
func ToCommandStrings ¶ added in v0.7.0
func ToDolarSignVariablePlaceHolder ¶ added in v0.5.0
func ToDolarSignWithWrapVariablePlaceHolder ¶ added in v0.5.0
func ToHeadersText ¶ added in v0.2.0
func UnmarshalJsonHelper ¶ added in v0.0.2
func UnmarshalJsonHelper[T comparable]( value *T, mapValues map[T]string, data []byte, errorMessage string, ) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.