Documentation ¶
Index ¶
- func FormatJSON(input string) (result string, err error)
- func IsJSON(s string) bool
- func JSONSStringsAreEqual(input1 string, input2 string) (result bool, err error)
- func JoinContent(value1 string, value2 string) string
- func JoinJSON(inputs ...string) string
- func UnWrapNonJSONStringIfNeeded(input string) string
- func WrapNonJSONStringIfNeeded(input string) (result string, err error)
- type Cartesian
- type RegexHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatJSON ¶
FormatJSON formats a JSON string
func JSONSStringsAreEqual ¶
JSONSStringsAreEqual checks whether two JSON strings are actually equal JSON objects
func JoinContent ¶
JoinContent returns two contents joined as JSON if both are JSONs otherwise concatenates them
func UnWrapNonJSONStringIfNeeded ¶
UnWrapNonJSONStringIfNeeded wrapps non JSON string in NonJSONItem object
func WrapNonJSONStringIfNeeded ¶
WrapNonJSONStringIfNeeded wrapps non JSON string in NonJSONItem object
Types ¶
type Cartesian ¶
type Cartesian struct { }
Cartesian gets all combinations of values for keys
func (Cartesian) CartesianDistribute ¶
CartesianDistribute getting full combinations distribution using cartesian combination algorithm - http://stackoverflow.com/a/15310051/613113
func (Cartesian) GetCombinations ¶
GetCombinations returns an array of maps with all combinations built by a map with values "key1": ["1", "2"], "key2":["3", "4"] -> [{"key1":"1", "key2":"3"}, {"key1":"1", "key2":"4"}, {"key1":"2", "key2":"3"}, {"key1":"2", "key2":"4"}]
type RegexHelper ¶
type RegexHelper struct { }
func (RegexHelper) GetCollectionItems ¶
func (RegexHelper) GetStringPart ¶
GetStringPart gets the value of the group name matching the input using the pattern