This commit is contained in:
28
main.go
28
main.go
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user