code: func (r *reader) ReadStatusCode() (int, error) {
  	var code int
  	for pos := 0; pos < len("200 "); pos++ {
  		c, err := r.ReadByte()
  		if err != nil {
  			return 0, err
  		}
  		switch pos {
  		case 0, 1, 2:
  			switch c {
  			case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
  				switch pos {
  				case 0:
  					code = int(int(c)-0x30) * 100
  				case 1:
  					code += int(int(c)-0x30) * 10
  				case 2:
  					code += int(int(c) - 0x30)
  				}
  			}
  		case 3:
  			switch c {
  			case '\r':
  				// special case "HTTP/1.1 301\r\n" has a blank reason.
  			case ' ':
  				// nothing
  			default:
  				return 0, fmt.Errorf("ReadStatusCode: expected %q, got %q at position %v", ' ', c, pos)
  			}
  		}
  	}
  	return code, nil
  }
docs: // ReadStatusCode reads the HTTP status code from the wire.