meilisearch / meilisearch-go

Golang wrapper for the Meilisearch API
https://www.meilisearch.com
MIT License
519 stars 85 forks source link

Choice value or pointer receiver on Index type #553

Closed Ja7ad closed 1 month ago

Ja7ad commented 2 months ago

Description In some methods we use value receiver and some methods used pointer receiver, Base on Go documentation we need choice one way.

Best practice is use pointer receiver.

https://go.dev/tour/methods/8

Screenshots or Logs

https://github.com/meilisearch/meilisearch-go/blob/869e74304eae91d70de5a9ac814c55b4683f33c4/index_documents.go#L209

https://github.com/meilisearch/meilisearch-go/blob/869e74304eae91d70de5a9ac814c55b4683f33c4/index_documents.go#L155

curquiza commented 2 months ago

Hello @Ja7ad Thanks for this suggestion!

Ja7ad commented 1 month ago

@curquiza This issue fixed on refactor.