String 返回HostType的字符串表示
()
| 162 | |
| 163 | // String 返回HostType的字符串表示 |
| 164 | func (ht HostType) String() string { |
| 165 | switch ht { |
| 166 | case HostTypeIP: |
| 167 | return "IP" |
| 168 | case HostTypeCIDR: |
| 169 | return "CIDR" |
| 170 | case HostTypeDomain: |
| 171 | return "DOMAIN" |
| 172 | default: |
| 173 | return "UNKNOWN" |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // String 返回Host的字符串表示 |
| 178 | func (h Host) String() string { |
nothing calls this directly
no outgoing calls
no test coverage detected