String converts the iota number into a string when marshalling the struct that uses the FrontendFormat which is int8 otherwise.
()
| 116 | // String converts the iota number into a string when marshalling |
| 117 | // the struct that uses the FrontendFormat which is int8 otherwise. |
| 118 | func (f FrontendFormat) String() string { |
| 119 | switch f { |
| 120 | default: |
| 121 | return "UNKNOWN" |
| 122 | case FrontendFormatBoolean: |
| 123 | return "BOOLEAN" |
| 124 | case FrontendFormatPassword: |
| 125 | return "PASSWORD" |
| 126 | case FrontendFormatString: |
| 127 | return "STRING" |
| 128 | case FrontendFormatSelect: |
| 129 | return "SELECT" |
| 130 | case FrontendFormatMultiSelect: |
| 131 | return "MULTI_SELECT" |
| 132 | case FrontendFormatByteSize: |
| 133 | return "BYTE_SIZE" |
| 134 | case FrontendFormatRatio: |
| 135 | return "RATIO" |
| 136 | case FrontendFormatDuration: |
| 137 | return "DURATION" |
| 138 | case FrontendFormatDecimal: |
| 139 | return "DECIMAL" |
| 140 | case FrontendFormatInteger: |
| 141 | return "INTEGER" |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | // MarshalText implements encoding.TextMarshaler. |
| 146 | func (f FrontendFormat) MarshalText() (text []byte, err error) { |
no outgoing calls
no test coverage detected