func readSource(src runes.Reader) string { rs, err := runes.ReadAll(src) if err != nil { panic(err) } return string(rs) }
// String returns a string containing the entire editor contents. func (ed *Editor) String() string { rs, err := runes.ReadAll(ed.buf.runes.Reader(0)) if err != nil { panic(err) } return string(rs) }