(args []interface{})
| 162 | } |
| 163 | |
| 164 | func interfaceToString(args []interface{}) []string { |
| 165 | argList := make([]string, len(args)) |
| 166 | for k, v := range args { |
| 167 | switch val := v.(type) { |
| 168 | case time.Duration: |
| 169 | argList[k] = val.String() |
| 170 | case string: |
| 171 | argList[k] = val |
| 172 | case int: |
| 173 | argList[k] = strconv.Itoa(val) |
| 174 | default: |
| 175 | panic(reflect.TypeOf(v)) |
| 176 | } |
| 177 | } |
| 178 | return argList |
| 179 | } |
| 180 | |
| 181 | func directDo(tb testing.TB, c *proto.Client, args ...interface{}) { |
| 182 | tb.Helper() |
no test coverage detected