(def any, format string)
| 701 | } |
| 702 | |
| 703 | func initFormatValidation(def any, format string) { |
| 704 | switch actual := def.(type) { |
| 705 | case *Parameter: |
| 706 | actual.Format = format |
| 707 | case *Header: |
| 708 | actual.Format = format |
| 709 | case *Items: |
| 710 | actual.Format = format |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | func initPatternValidation(def any, pattern string) { |
| 715 | switch actual := def.(type) { |