(u uint8)
| 310 | } |
| 311 | |
| 312 | func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) { |
| 313 | switch u { |
| 314 | case 'H': |
| 315 | return time.Hour, true |
| 316 | case 'M': |
| 317 | return time.Minute, true |
| 318 | case 'S': |
| 319 | return time.Second, true |
| 320 | case 'm': |
| 321 | return time.Millisecond, true |
| 322 | case 'u': |
| 323 | return time.Microsecond, true |
| 324 | case 'n': |
| 325 | return time.Nanosecond, true |
| 326 | default: |
| 327 | return |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | // isPermanentHTTPHeader checks whether hdr belongs to the list of |
| 332 | // permanent request headers maintained by IANA. |