code: func DecodeDict(data []byte, start int) (
  	result interface{}, index int, err error) {
  
  	if start >= len(data) || data[start] != 'd' {
  		err = errors.New("invalid dict bencode")
  		return
  	}
  
  	var item, key interface{}
  	r := make(map[string]interface{})
  
  	index = start + 1
  	for index < len(data) {
  		char, _ := utf8.DecodeRune(data[index:])
  		if char == 'e' {
  			break
  		}
  
  		if !unicode.IsDigit(char) {
  			err = errors.New("invalid dict bencode")
  			return
  		}
  
  		key, index, err = DecodeString(data, index)
  		if err != nil {
  			return
  		}
  
  		if index >= len(data) {
  			err = errors.New("out of range")
  			return
  		}
  
  		item, index, err = decodeItem(data, index)
  		if err != nil {
  			return
  		}
  
  		r[key.(string)] = item
  	}
  
  	if index == len(data) {
  		err = errors.New("'e' not found when decode dict")
  		return
  	}
  	index++
  
  	result = r
  	return
  }
docs: // DecodeDict decodes a map value.