github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/formatters/string.go (about) 1 package formatters 2 3 import ( 4 "fmt" 5 "reflect" 6 ) 7 8 func MapStr(args interface{}) []string { 9 r := reflect.ValueOf(args) 10 rval := make([]string, r.Len()) 11 for i := 0; i < r.Len(); i++ { 12 rval[i] = r.Index(i).Interface().(fmt.Stringer).String() 13 } 14 return rval 15 16 }