code: func NewReader(r io.Reader) (*Reader, error) {
  	h, _ := NewHeader(nil, nil)
  	sr := &Reader{
  		r: bufio.NewReader(r),
  		h: h,
  	}
  
  	var b []byte
  	p, err := sr.r.Peek(1)
  	if err != nil {
  		return nil, err
  	}
  	if p[0] != '@' {
  		sr.seenRefs = make(map[string]*Reference)
  		return sr, nil
  	}
  
  	for {
  		l, err := sr.r.ReadBytes('\n')
  		if err != nil {
  			return nil, io.ErrUnexpectedEOF
  		}
  		b = append(b, l...)
  		p, err := sr.r.Peek(1)
  		if err == io.EOF {
  			break
  		}
  		if err != nil {
  			return nil, err
  		}
  		if p[0] != '@' {
  			break
  		}
  	}
  
  	err = sr.h.UnmarshalText(b)
  	if err != nil {
  		return nil, err
  	}
  
  	return sr, nil
  }
docs: // NewReader returns a new Reader, reading from the given io.Reader.