From c3ce762388aa2129f3b6844f5a77c1ace405a67d Mon Sep 17 00:00:00 2001 From: Dimas Restu H Date: Sat, 23 Apr 2022 19:57:23 +0700 Subject: [PATCH] refactor update function name convertFileToBuffer to convertFileToBytes --- internal/whatsapp/whatsapp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/whatsapp/whatsapp.go b/internal/whatsapp/whatsapp.go index c7e9866..75b6480 100644 --- a/internal/whatsapp/whatsapp.go +++ b/internal/whatsapp/whatsapp.go @@ -24,7 +24,7 @@ func jwtPayload(c echo.Context) typAuth.AuthJWTClaimsPayload { return jwtClaims.Data } -func convertFileToBuffer(file multipart.File) ([]byte, error) { +func convertFileToBytes(file multipart.File) ([]byte, error) { // Create Empty Buffer buffer := bytes.NewBuffer(nil) @@ -84,7 +84,7 @@ func sendMedia(c echo.Context, mediaType string) error { // Convert File Stream in to Bytes // Since WhatsApp Proto for Media is only Accepting Bytes format - fileBytes, err := convertFileToBuffer(fileStream) + fileBytes, err := convertFileToBytes(fileStream) if err != nil { return router.ResponseInternalError(c, err.Error()) }