code: func (r *reader) ReadVersion() (Version, error) {
  	var major, minor int
  	for pos := 0; pos < len("HTTP/x.x "); pos++ {
  		c, err := r.ReadByte()
  		if err != nil {
  			return invalidVersion, err
  		}
  		switch pos {
  		case 0:
  			if c != 'H' {
  				return readVersionErr(pos, 'H', c)
  			}
  		case 1, 2:
  			if c != 'T' {
  				return readVersionErr(pos, 'T', c)
  			}
  		case 3:
  			if c != 'P' {
  				return readVersionErr(pos, 'P', c)
  			}
  		case 4:
  			if c != '/' {
  				return readVersionErr(pos, '/', c)
  			}
  		case 5:
  			switch c {
  			case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
  				major = int(int(c) - 0x30)
  			}
  		case 6:
  			if c != '.' {
  				return readVersionErr(pos, '.', c)
  			}
  		case 7:
  			switch c {
  			case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
  				minor = int(int(c) - 0x30)
  			}
  		case 8:
  			if c != ' ' {
  				return readVersionErr(pos, ' ', c)
  			}
  		}
  	}
  	return Version{major, minor}, nil
  }
docs: // ReadVersion reads a HTTP version string from the wire.