Explorar o código

fix Unmarshal

silenceper %!s(int64=6) %!d(string=hai) anos
pai
achega
dbb43ac7ad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      material/material.go

+ 1 - 1
material/material.go

@@ -63,7 +63,7 @@ func (material *Material) AddNews(articles []*Article) (mediaID string, err erro
 	uri := fmt.Sprintf("%s?access_token=%s", addNewsURL, accessToken)
 	responseBytes, err := util.PostJSON(uri, req)
 	var res resArticles
-	err = json.Unmarshal(responseBytes, res)
+	err = json.Unmarshal(responseBytes, &res)
 	if err != nil {
 		return
 	}