code: func readMap(r *bufio.Reader, isRoot bool) (msg map[string]interface{}, err error) {
  	msg = map[string]interface{}{}
  	for {
  		c, err := r.ReadByte()
  		if err == io.EOF && isRoot { //may be root section
  			return msg, nil
  		}
  		if err != nil {
  			return nil, err
  		}
  		switch elementType(c) {
  		case etSECTION_START:
  			key, value, err := readKeyMap(r)
  			if err != nil {
  				return nil, err
  			}
  			msg[getNewKeyToHandleDuplicates(key, msg)] = value
  		case etLIST_START:
  			key, value, err := readKeyList(r)
  			if err != nil {
  				return nil, err
  			}
  			msg[getNewKeyToHandleDuplicates(key, msg)] = value
  		case etKEY_VALUE:
  			key, value, err := readKeyString(r)
  			if err != nil {
  				return nil, err
  			}
  			msg[getNewKeyToHandleDuplicates(key, msg)] = value
  		case etSECTION_END: //end of outer section
  			return msg, nil
  		default:
  			panic(fmt.Errorf("[readMap] protocol error 1, %d %#v", c, msg))
  			//return nil, fmt.Errorf("[readMap] protocol error 1, %d",c)
  		}
  	}
  	return
  }
docs: //SECTION_START has been read already.