Repository: ctreminiom/go-atlassian
Pull request #188 (2023-04-20 04:26:48)

:wastebasket: Deprecated the io/ioutil package


Patch:
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 35ba408..b8870d8 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -18,7 +18,7 @@ jobs:
       - name: Set up Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.15
+          go-version: 1.17
 
       - name: Run coverage
         run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
diff --git a/admin/admin.go b/admin/admin.go
index 37ec83b..2a14c3b 100644
--- a/admin/admin.go
+++ b/admin/admin.go
@@ -7,7 +7,6 @@ import (
 	"errors"
 	"fmt"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -120,7 +119,7 @@ func transformTheHTTPResponse(response *http.Response, structure interface{}) (r
 		return responseTransformed, fmt.Errorf(requestFailedError, response.StatusCode)
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/confluence/api_client_impl.go b/confluence/api_client_impl.go
index 0254be8..19d7ecf 100644
--- a/confluence/api_client_impl.go
+++ b/confluence/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -151,7 +150,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/confluence/internal/page_impl.go b/confluence/internal/page_impl.go
index 5a117dd..0667bd2 100644
--- a/confluence/internal/page_impl.go
+++ b/confluence/internal/page_impl.go
@@ -11,6 +11,7 @@ import (
 	"strconv"
 )
 
+// NewPageService returns a new Confluence V2 Page service
 func NewPageService(client service.Client) *PageService {
 	return &PageService{
 		internalClient: &internalPageImpl{c: client},
@@ -26,8 +27,8 @@ type PageService struct {
 // GET /wiki/api/v2/pages/{id}
 //
 // https://docs.go-atlassian.io/confluence-cloud/v2/page#get-page-by-id
-func (p *PageService) Get(ctx context.Context, pageId int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error) {
-	return p.internalClient.Get(ctx, pageId, format, draft, version)
+func (p *PageService) Get(ctx context.Context, pageID int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error) {
+	return p.internalClient.Get(ctx, pageID, format, draft, version)
 }
 
 // Bulk returns all pages.
@@ -52,8 +53,8 @@ func (p *PageService) Bulk(ctx context.Context, cursor string, limit int) (*mode
 // GET /wiki/api/v2/labels/{id}/pages
 //
 // https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-for-label
-func (p *PageService) GetsByLabel(ctx context.Context, labelId int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
-	return p.internalClient.GetsByLabel(ctx, labelId, sort, cursor, limit)
+func (p *PageService) GetsByLabel(ctx context.Context, labelID int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
+	return p.internalClient.GetsByLabel(ctx, labelID, sort, cursor, limit)
 }
 
 // GetsBySpace returns all pages in a space.
@@ -65,8 +66,8 @@ func (p *PageService) GetsByLabel(ctx context.Context, labelId int, sort, cursor
 // GET /wiki/api/v2/spaces/{id}/pages
 //
 // https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-in-space
-func (p *PageService) GetsBySpace(ctx context.Context, spaceId int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
-	return p.internalClient.GetsBySpace(ctx, spaceId, cursor, limit)
+func (p *PageService) GetsBySpace(ctx context.Context, spaceID int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
+	return p.internalClient.GetsBySpace(ctx, spaceID, cursor, limit)
 }
 
 // Create creates a page in the space.
@@ -87,8 +88,8 @@ func (p *PageService) Create(ctx context.Context, payload *model.PageCreatePaylo
 // PUT /wiki/api/v2/pages/{id}
 //
 // https://docs.go-atlassian.io/confluence-cloud/v2/page#update-page
-func (p *PageService) Update(ctx context.Context, pageId int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error) {
-	return p.internalClient.Update(ctx, pageId, payload)
+func (p *PageService) Update(ctx context.Context, pageID int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error) {
+	return p.internalClient.Update(ctx, pageID, payload)
 }
 
 // Delete deletes a page by id.
@@ -96,17 +97,17 @@ func (p *PageService) Update(ctx context.Context, pageId int, payload *model.Pag
 // DELETE /wiki/api/v2/pages/{id}
 //
 // https://docs.go-atlassian.io/confluence-cloud/v2/page#delete-page
-func (p *PageService) Delete(ctx context.Context, pageId int) (*model.ResponseScheme, error) {
-	return p.internalClient.Delete(ctx, pageId)
+func (p *PageService) Delete(ctx context.Context, pageID int) (*model.ResponseScheme, error) {
+	return p.internalClient.Delete(ctx, pageID)
 }
 
 type internalPageImpl struct {
 	c service.Client
 }
 
-func (i *internalPageImpl) Get(ctx context.Context, pageId int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error) {
+func (i *internalPageImpl) Get(ctx context.Context, pageID int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error) {
 
-	if pageId == 0 {
+	if pageID == 0 {
 		return nil, nil, model.ErrNoPageIDError
 	}
 
@@ -124,7 +125,7 @@ func (i *internalPageImpl) Get(ctx context.Context, pageId int, format string, d
 		query.Add("version", strconv.Itoa(version))
 	}
 
-	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v?%v", pageId, query.Encode())
+	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v?%v", pageID, query.Encode())
 
 	request, err := i.c.NewRequest(ctx, http.MethodGet, endpoint, nil)
 	if err != nil {
@@ -165,9 +166,9 @@ func (i *internalPageImpl) Bulk(ctx context.Context, cursor string, limit int) (
 	return chunk, response, nil
 }
 
-func (i *internalPageImpl) GetsByLabel(ctx context.Context, labelId int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
+func (i *internalPageImpl) GetsByLabel(ctx context.Context, labelID int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
 
-	if labelId == 0 {
+	if labelID == 0 {
 		return nil, nil, model.ErrNoLabelIDError
 	}
 
@@ -182,7 +183,7 @@ func (i *internalPageImpl) GetsByLabel(ctx context.Context, labelId int, sort, c
 		query.Add("sort", sort)
 	}
 
-	endpoint := fmt.Sprintf("wiki/api/v2/labels/%v/pages?%v", labelId, query.Encode())
+	endpoint := fmt.Sprintf("wiki/api/v2/labels/%v/pages?%v", labelID, query.Encode())
 
 	request, err := i.c.NewRequest(ctx, http.MethodGet, endpoint, nil)
 	if err != nil {
@@ -198,9 +199,9 @@ func (i *internalPageImpl) GetsByLabel(ctx context.Context, labelId int, sort, c
 	return chunk, response, nil
 }
 
-func (i *internalPageImpl) GetsBySpace(ctx context.Context, spaceId int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
+func (i *internalPageImpl) GetsBySpace(ctx context.Context, spaceID int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error) {
 
-	if spaceId == 0 {
+	if spaceID == 0 {
 		return nil, nil, model.ErrNoSpaceIDError
 	}
 
@@ -211,7 +212,7 @@ func (i *internalPageImpl) GetsBySpace(ctx context.Context, spaceId int, cursor
 		query.Add("cursor", cursor)
 	}
 
-	endpoint := fmt.Sprintf("wiki/api/v2/spaces/%v/pages?%v", spaceId, query.Encode())
+	endpoint := fmt.Sprintf("wiki/api/v2/spaces/%v/pages?%v", spaceID, query.Encode())
 
 	request, err := i.c.NewRequest(ctx, http.MethodGet, endpoint, nil)
 	if err != nil {
@@ -250,9 +251,9 @@ func (i *internalPageImpl) Create(ctx context.Context, payload *model.PageCreate
 	return page, response, nil
 }
 
-func (i *internalPageImpl) Update(ctx context.Context, pageId int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error) {
+func (i *internalPageImpl) Update(ctx context.Context, pageID int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error) {
 
-	if pageId == 0 {
+	if pageID == 0 {
 		return nil, nil, model.ErrNoPageIDError
 	}
 
@@ -261,7 +262,7 @@ func (i *internalPageImpl) Update(ctx context.Context, pageId int, payload *mode
 		return nil, nil, err
 	}
 
-	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v", pageId)
+	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v", pageID)
 
 	request, err := i.c.NewRequest(ctx, http.MethodPut, endpoint, reader)
 	if err != nil {
@@ -277,13 +278,13 @@ func (i *internalPageImpl) Update(ctx context.Context, pageId int, payload *mode
 	return page, response, nil
 }
 
-func (i *internalPageImpl) Delete(ctx context.Context, pageId int) (*model.ResponseScheme, error) {
+func (i *internalPageImpl) Delete(ctx context.Context, pageID int) (*model.ResponseScheme, error) {
 
-	if pageId == 0 {
+	if pageID == 0 {
 		return nil, model.ErrNoPageIDError
 	}
 
-	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v", pageId)
+	endpoint := fmt.Sprintf("wiki/api/v2/pages/%v", pageID)
 
 	request, err := i.c.NewRequest(ctx, http.MethodDelete, endpoint, nil)
 	if err != nil {
diff --git a/confluence/internal/space_impl.go b/confluence/internal/space_impl.go
index 1cf2eaf..f33a712 100644
--- a/confluence/internal/space_impl.go
+++ b/confluence/internal/space_impl.go
@@ -126,7 +126,7 @@ func (i *internalSpaceImpl) Gets(ctx context.Context, options *model.GetSpacesOp
 		if len(options.SpaceIDs) != 0 {
 
 			for _, id := range options.SpaceIDs {
-				query.Add("spaceId", strconv.Itoa(id))
+				query.Add("spaceID", strconv.Itoa(id))
 			}
 		}
 
diff --git a/confluence/v2/api_client_impl.go b/confluence/v2/api_client_impl.go
index 5ee4455..2aeaec0 100644
--- a/confluence/v2/api_client_impl.go
+++ b/confluence/v2/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -129,7 +128,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/jira/agile/api_client_impl.go b/jira/agile/api_client_impl.go
index 2b838bd..f151b11 100644
--- a/jira/agile/api_client_impl.go
+++ b/jira/agile/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -121,7 +120,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/jira/sm/api_client_impl.go b/jira/sm/api_client_impl.go
index 63633c7..90187a2 100644
--- a/jira/sm/api_client_impl.go
+++ b/jira/sm/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -220,7 +219,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/jira/v2/api_client_impl.go b/jira/v2/api_client_impl.go
index 45b0893..8074305 100644
--- a/jira/v2/api_client_impl.go
+++ b/jira/v2/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -468,7 +467,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/jira/v3/api_client_impl.go b/jira/v3/api_client_impl.go
index cf8d237..8f3d10a 100644
--- a/jira/v3/api_client_impl.go
+++ b/jira/v3/api_client_impl.go
@@ -8,7 +8,6 @@ import (
 	"github.com/ctreminiom/go-atlassian/pkg/infra/models"
 	"github.com/ctreminiom/go-atlassian/service/common"
 	"io"
-	"io/ioutil"
 	"net/http"
 	"net/url"
 	"reflect"
@@ -468,7 +467,7 @@ func (c *Client) TransformTheHTTPResponse(response *http.Response, structure int
 		Method:   response.Request.Method,
 	}
 
-	responseAsBytes, err := ioutil.ReadAll(response.Body)
+	responseAsBytes, err := io.ReadAll(response.Body)
 	if err != nil {
 		return responseTransformed, err
 	}
diff --git a/service/confluence/page.go b/service/confluence/page.go
index 32928b3..1df2972 100644
--- a/service/confluence/page.go
+++ b/service/confluence/page.go
@@ -14,7 +14,7 @@ type PageConnector interface {
 	// GET /wiki/api/v2/pages/{id}
 	//
 	// https://docs.go-atlassian.io/confluence-cloud/v2/page#get-page-by-id
-	Get(ctx context.Context, pageId int, format string, draft bool, version int) (*models.PageScheme, *models.ResponseScheme, error)
+	Get(ctx context.Context, pageID int, format string, draft bool, version int) (*models.PageScheme, *models.ResponseScheme, error)
 
 	// Bulk returns all pages.
 	//
@@ -36,7 +36,7 @@ type PageConnector interface {
 	// GET /wiki/api/v2/labels/{id}/pages
 	//
 	// https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-for-label
-	GetsByLabel(ctx context.Context, labelId int, sort, cursor string, limit int) (*models.PageChunkScheme, *models.ResponseScheme, error)
+	GetsByLabel(ctx context.Context, labelID int, sort, cursor string, limit int) (*models.PageChunkScheme, *models.ResponseScheme, error)
 
 	// GetsBySpace returns all pages in a space.
 	//
@@ -47,7 +47,7 @@ type PageConnector interface {
 	// GET /wiki/api/v2/spaces/{id}/pages
 	//
 	// https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-in-space
-	GetsBySpace(ctx context.Context, spaceId int, cursor string, limit int) (*models.PageChunkScheme, *models.ResponseScheme, error)
+	GetsBySpace(ctx context.Context, spaceID int, cursor string, limit int) (*models.PageChunkScheme, *models.ResponseScheme, error)
 
 	// Create creates a page in the space.
 	//
@@ -65,12 +65,12 @@ type PageConnector interface {
 	// PUT /wiki/api/v2/pages/{id}
 	//
 	// https://docs.go-atlassian.io/confluence-cloud/v2/page#update-page
-	Update(ctx context.Context, pageId int, payload *models.PageUpdatePayloadScheme) (*models.PageScheme, *models.ResponseScheme, error)
+	Update(ctx context.Context, pageID int, payload *models.PageUpdatePayloadScheme) (*models.PageScheme, *models.ResponseScheme, error)
 
 	// Delete deletes a page by id.
 	//
 	// DELETE /wiki/api/v2/pages/{id}
 	//
 	// https://docs.go-atlassian.io/confluence-cloud/v2/page#delete-page
-	Delete(ctx context.Context, pageId int) (*models.ResponseScheme, error)
+	Delete(ctx context.Context, pageID int) (*models.ResponseScheme, error)
 }


Test patch:
diff --git a/confluence/internal/page_impl_test.go b/confluence/internal/page_impl_test.go
index d5c0d94..377f4db 100644
--- a/confluence/internal/page_impl_test.go
+++ b/confluence/internal/page_impl_test.go
@@ -22,7 +22,7 @@ func Test_internalPageImpl_Get(t *testing.T) {
 
 	type args struct {
 		ctx     context.Context
-		pageId  int
+		pageID  int
 		format  string
 		draft   bool
 		version int
@@ -40,7 +40,7 @@ func Test_internalPageImpl_Get(t *testing.T) {
 			name: "when the parameters are correct",
 			args: args{
 				ctx:     context.TODO(),
-				pageId:  200001,
+				pageID:  200001,
 				format:  "atlas_doc_format",
 				draft:   true,
 				version: 2,
@@ -69,7 +69,7 @@ func Test_internalPageImpl_Get(t *testing.T) {
 			name: "when the http request cannot be created",
 			args: args{
 				ctx:     context.TODO(),
-				pageId:  200001,
+				pageID:  200001,
 				format:  "atlas_doc_format",
 				draft:   true,
 				version: 2,
@@ -111,7 +111,7 @@ func Test_internalPageImpl_Get(t *testing.T) {
 
 			newService := NewPageService(testCase.fields.c)
 
-			gotResult, gotResponse, err := newService.Get(testCase.args.ctx, testCase.args.pageId, testCase.args.format,
+			gotResult, gotResponse, err := newService.Get(testCase.args.ctx, testCase.args.pageID, testCase.args.format,
 				testCase.args.draft, testCase.args.version)
 
 			if testCase.wantErr {
@@ -242,7 +242,7 @@ func Test_internalPageImpl_GetsByLabel(t *testing.T) {
 
 	type args struct {
 		ctx     context.Context
-		labelId int
+		labelID int
 		sort    string
 		cursor  string
 		limit   int
@@ -260,7 +260,7 @@ func Test_internalPageImpl_GetsByLabel(t *testing.T) {
 			name: "when the parameters are correct",
 			args: args{
 				ctx:     context.TODO(),
-				labelId: 20001,
+				labelID: 20001,
 				sort:    "test-label",
 				cursor:  "cursor-sample",
 				limit:   200,
@@ -298,7 +298,7 @@ func Test_internalPageImpl_GetsByLabel(t *testing.T) {
 			name: "when the http request cannot be created",
 			args: args{
 				ctx:     context.TODO(),
-				labelId: 20001,
+				labelID: 20001,
 				sort:    "test-label",
 				cursor:  "cursor-sample",
 				limit:   200,
@@ -331,7 +331,7 @@ func Test_internalPageImpl_GetsByLabel(t *testing.T) {
 
 			newService := NewPageService(testCase.fields.c)
 
-			gotResult, gotResponse, err := newService.GetsByLabel(testCase.args.ctx, testCase.args.labelId,
+			gotResult, gotResponse, err := newService.GetsByLabel(testCase.args.ctx, testCase.args.labelID,
 				testCase.args.sort, testCase.args.cursor, testCase.args.limit)
 
 			if testCase.wantErr {
@@ -360,7 +360,7 @@ func Test_internalPageImpl_GetsBySpace(t *testing.T) {
 
 	type args struct {
 		ctx     context.Context
-		spaceId int
+		spaceID int
 		cursor  string
 		limit   int
 	}
@@ -377,7 +377,7 @@ func Test_internalPageImpl_GetsBySpace(t *testing.T) {
 			name: "when the parameters are correct",
 			args: args{
 				ctx:     context.TODO(),
-				spaceId: 20001,
+				spaceID: 20001,
 				cursor:  "cursor-sample",
 				limit:   200,
 			},
@@ -414,7 +414,7 @@ func Test_internalPageImpl_GetsBySpace(t *testing.T) {
 			name: "when the http request cannot be created",
 			args: args{
 				ctx:     context.TODO(),
-				spaceId: 20001,
+				spaceID: 20001,
 				cursor:  "cursor-sample",
 				limit:   200,
 			},
@@ -445,7 +445,7 @@ func Test_internalPageImpl_GetsBySpace(t *testing.T) {
 
 			newService := NewPageService(testCase.fields.c)
 
-			gotResult, gotResponse, err := newService.GetsBySpace(testCase.args.ctx, testCase.args.spaceId,
+			gotResult, gotResponse, err := newService.GetsBySpace(testCase.args.ctx, testCase.args.spaceID,
 				testCase.args.cursor, testCase.args.limit)
 
 			if testCase.wantErr {
@@ -474,7 +474,7 @@ func Test_internalPageImpl_Delete(t *testing.T) {
 
 	type args struct {
 		ctx    context.Context
-		pageId int
+		pageID int
 	}
 
 	testCases := []struct {
@@ -489,7 +489,7 @@ func Test_internalPageImpl_Delete(t *testing.T) {
 			name: "when the parameters are correct",
 			args: args{
 				ctx:    context.TODO(),
-				pageId: 200001,
+				pageID: 200001,
 			},
 			on: func(fields *fields) {
 
@@ -515,7 +515,7 @@ func Test_internalPageImpl_Delete(t *testing.T) {
 			name: "when the http request cannot be created",
 			args: args{
 				ctx:    context.TODO(),
-				pageId: 200001,
+				pageID: 200001,
 			},
 			on: func(fields *fields) {
 
@@ -554,7 +554,7 @@ func Test_internalPageImpl_Delete(t *testing.T) {
 
 			newService := NewPageService(testCase.fields.c)
 
-			gotResponse, err := newService.Delete(testCase.args.ctx, testCase.args.pageId)
+			gotResponse, err := newService.Delete(testCase.args.ctx, testCase.args.pageID)
 
 			if testCase.wantErr {
 
@@ -782,7 +782,7 @@ func Test_internalPageImpl_Update(t *testing.T) {
 
 	type args struct {
 		ctx     context.Context
-		pageId  int
+		pageID  int
 		payload *model.PageUpdatePayloadScheme
 	}
 
@@ -798,7 +798,7 @@ func Test_internalPageImpl_Update(t *testing.T) {
 			name: "when the parameters are correct",
 			args: args{
 				ctx:     context.TODO(),
-				pageId:  215646235,
+				pageID:  215646235,
 				payload: mockedPayload,
 			},
 			on: func(fields *fields) {
@@ -829,7 +829,7 @@ func Test_internalPageImpl_Update(t *testing.T) {
 			name: "when the http request cannot be created",
 			args: args{
 				ctx:     context.TODO(),
-				pageId:  215646235,
+				pageID:  215646235,
 				payload: mockedPayload,
 			},
 			on: func(fields *fields) {
@@ -867,7 +867,7 @@ func Test_internalPageImpl_Update(t *testing.T) {
 			name: "when the payload is not provided",
 			args: args{
 				ctx:    context.TODO(),
-				pageId: 215646235,
+				pageID: 215646235,
 			},
 			on: func(fields *fields) {
 
@@ -894,7 +894,7 @@ func Test_internalPageImpl_Update(t *testing.T) {
 
 			newService := NewPageService(testCase.fields.c)
 
-			gotResult, gotResponse, err := newService.Update(testCase.args.ctx, testCase.args.pageId, testCase.args.payload)
+			gotResult, gotResponse, err := newService.Update(testCase.args.ctx, testCase.args.pageID, testCase.args.payload)
 
 			if testCase.wantErr {
 
diff --git a/confluence/internal/space_impl_test.go b/confluence/internal/space_impl_test.go
index 978e9e8..9fbe310 100644
--- a/confluence/internal/space_impl_test.go
+++ b/confluence/internal/space_impl_test.go
@@ -56,7 +56,7 @@ func Test_internalSpaceImpl_Gets(t *testing.T) {
 				client.On("NewRequest",
 					context.Background(),
 					http.MethodGet,
-					"wiki/rest/api/space?expand=operations&favorite=true&favouriteUserKey=DUMMY&label=label-09%2Clabel-02&limit=50&spaceId=1111&spaceId=2222&spaceId=3333&spaceKey=DUMMY&spaceKey=TEST&start=0&status=archived&type=global",
+					"wiki/rest/api/space?expand=operations&favorite=true&favouriteUserKey=DUMMY&label=label-09%2Clabel-02&limit=50&spaceID=1111&spaceID=2222&spaceID=3333&spaceKey=DUMMY&spaceKey=TEST&start=0&status=archived&type=global",
 					nil).
 					Return(&http.Request{}, nil)
 
@@ -94,7 +94,7 @@ func Test_internalSpaceImpl_Gets(t *testing.T) {
 				client.On("NewRequest",
 					context.Background(),
 					http.MethodGet,
-					"wiki/rest/api/space?expand=operations&favorite=true&favouriteUserKey=DUMMY&label=label-09%2Clabel-02&limit=50&spaceId=1111&spaceId=2222&spaceId=3333&spaceKey=DUMMY&spaceKey=TEST&start=0&status=archived&type=global",
+					"wiki/rest/api/space?expand=operations&favorite=true&favouriteUserKey=DUMMY&label=label-09%2Clabel-02&limit=50&spaceID=1111&spaceID=2222&spaceID=3333&spaceKey=DUMMY&spaceKey=TEST&start=0&status=archived&type=global",
 					nil).
 					Return(&http.Request{}, errors.New("error, unable to create the http request"))