//ReadFrom function will read the properties from a io.Reader.
//This function does not close the reader and it is the responsibility of the caller to close the reader
ReadFrom function will read the properties from a io.Reader.
This function does not close the reader and it is the responsibility of the caller to close the reader
// ReadFrom function will read the properties from a io . Reader . // This function does not close the reader and it is the responsibility of the caller to close the reader
func (p *Properties) ReadFrom(r io.Reader) error {
	scanner := bufio.NewScanner(r)
	for scanner.Scan() {
		line := scanner.Text()
		l := len(line)
		if l == 0 || line[0] == textutils.HashChar || line[0] == textutils.EqualChar {
			continue
		}
		for i, c := range line {
			if i > 0 && i < l-1 && line[i] != textutils.BackSlashChar && c == textutils.EqualChar {
				p.props[line[0:i]] = createValue(line[0:i], line[i+1:l])
				break
			}
		}
	}
	p.resolveAll()
	return nil
}
func ( p * Properties ) ReadFrom ( r io . Reader ) error { scanner := bufio . NewScanner ( r ) for scanner . Scan ( ) { line := scanner . Text ( ) l := len ( line ) if l == 0 || line [ 0 ] == textutils . HashChar || line [ 0 ] == textutils . EqualChar { continue } for i , c := range line { if i > 0 && i < l - 1 && line [ i ] != textutils . BackSlashChar && c == textutils . EqualChar { p . props [ line [ 0 : i ] ] = createValue ( line [ 0 : i ] , line [ i + 1 : l ] ) break } } } p . resolveAll ( ) return nil }
ReadFrom function will read the properties from a io.Reader.
ReadFrom function will read the properties from a io . Reader .
//Cases where it is not a valid props entry.