add HTML rendering capabilities and helper functions

This commit is contained in:
2024-11-12 23:46:40 +01:00
parent e44f56635b
commit f9990d37c0
8 changed files with 488 additions and 5 deletions
+33
View File
@@ -0,0 +1,33 @@
package testhelpers
func CheckSlicesEquality(a []any, b []any) bool {
if len(a) != len(b) {
return false
}
aMap := make(map[any]int)
bMap := make(map[any]int)
for _, v := range a {
aMap[v]++
}
for _, v := range b {
bMap[v]++
}
for k, v := range aMap {
if bMap[k] != v {
return false
}
}
return true
}
func StringSliceToAnySlice(s []string) []any {
var result []any
for _, v := range s {
result = append(result, v)
}
return result
}