code: func decodeItem(data []byte, i int) (
  	result interface{}, index int, err error) {
  
  	var decodeFunc = []func([]byte, int) (interface{}, int, error){
  		DecodeString, DecodeInt, DecodeList, DecodeDict,
  	}
  
  	for _, f := range decodeFunc {
  		result, index, err = f(data, i)
  		if err == nil {
  			return
  		}
  	}
  
  	err = errors.New("invalid bencode when decode item")
  	return
  }
docs: // decodeItem decodes an item of dict or list.