func ParseText(reader io.Reader) (*Digest, error) {
	text, err := ioutil.ReadAll(reader)
	if err != nil {
		return nil, errors.Wrap(err, "unable to read ion text to parse")
	}

	t := &parser{}
	if err := t.Parse(text); err != nil {
		return nil, err
	}

	return t.digest, nil
}
// ParseText parses all of the bytes from the given Reader into an
// instance of Digest.  Assume that the entire contents of reading the
// given reader will be kept in memory.  This allows for lazy evaluation
// of values, e.g. don't turn "1234" into an int unless its value is
// accessed.
ParseText parses all of the bytes from the given Reader into an
instance of Digest.  Assume that the entire contents of reading the
given reader will be kept in memory.  This allows for lazy evaluation
of values, e.g. don't turn "1234" into an int unless its value is
accessed.
// ParseText parses all of the bytes from the given Reader into an // instance of Digest . Assume that the entire contents of reading the // given reader will be kept in memory . This allows for lazy evaluation // of values e . g . don ' t turn " 1234 " into an int unless its value is // accessed .
func ParseText(reader io.Reader) (*Digest, error) {
	text, err := ioutil.ReadAll(reader)
	if err != nil {
		return nil, errors.Wrap(err, "unable to read ion text to parse")
	}
	t := &parser{}
	if err := t.Parse(text); err != nil {
		return nil, err
	}
	return t.digest, nil
}
func ParseText ( reader io . Reader ) ( * Digest , error ) { text , err := ioutil . ReadAll ( reader ) if err != nil { return nil , errors . Wrap ( err , " " ) } t := & parser { } if err := t . Parse ( text ) ; err != nil { return nil , err } return t . digest , nil }
ParseText parses all of the bytes from the given Reader into an
instance of Digest.
ParseText parses all of the bytes from the given Reader into an instance of Digest .