flagType calculates the type of a flag
(tname string)
| 420 | |
| 421 | // flagType calculates the type of a flag |
| 422 | func flagType(tname string) string { |
| 423 | switch tname { |
| 424 | case boolN, intN, int32N, int64N, uintN, uint32N, uint64N, float32N, float64N, stringN: |
| 425 | return strings.ToUpper(tname) |
| 426 | case bytesN: |
| 427 | return "STRING" |
| 428 | default: // Any, Array, Map, Object, User |
| 429 | return "JSON" |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | // jsonExample generates a json example |
| 434 | func jsonExample(v any) string { |
no outgoing calls
no test coverage detected