implement hasKeys check
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-01-03 11:55:56 +11:00
parent b2b27b2306
commit e1a1e5a49d
6 changed files with 129 additions and 21 deletions

28
main.go
View File

@@ -89,3 +89,31 @@ func OrderedToStringMap(input orderedmap.OrderedMap) map[string]string {
return result
}
func OrderedToStringSlice(input []interface{}) []string {
result := []string{}
//vs := testsInterface.([]interface{})
//fmt.Printf("Listing %d test definitions\n", len(vs))
for i := range input {
//fmt.Printf("Reading '%s'\n", input[i])
switch vType := input[i].(type) {
case string:
result = append(result, input[i].(string))
default:
fmt.Printf("OrderedToStringSlice received unexpected value type, %T\n", vType)
}
/*
v := vInterface.(orderedmap.OrderedMap)
keys := v.Keys()
fmt.Printf("Test %d\n", i)
for j := range keys {
fmt.Printf("[%d] : %s\n", j, keys[j])
}
*/
}
return result
}