code: func (s *Stream) sendClose() error {
  	s.controlHdrLock.Lock()
  	defer s.controlHdrLock.Unlock()
  
  	flags := s.sendFlags()
  	flags |= flagFIN
  	s.controlHdr.encode(typeWindowUpdate, flags, s.id, 0)
  	if err := s.session.waitForSendErr(s.controlHdr, nil, s.controlErr); err != nil {
  		return err
  	}
  	return nil
  }
docs: // sendClose is used to send a FIN