From b959f0d6c8f7456f9423f083492b0622b8bf7ee1 Mon Sep 17 00:00:00 2001 From: Robert Yokota Date: Wed, 14 Aug 2024 09:01:20 -0700 Subject: [PATCH] Fix some golint naming issues (#6) (#1272) --- schemaregistry/mock_schemaregistry_client.go | 2 +- schemaregistry/rest_service.go | 2 +- schemaregistry/schemaregistry_client.go | 2 +- schemaregistry/schemaregistry_client_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/schemaregistry/mock_schemaregistry_client.go b/schemaregistry/mock_schemaregistry_client.go index 7d3154c54..ec48e9b3a 100644 --- a/schemaregistry/mock_schemaregistry_client.go +++ b/schemaregistry/mock_schemaregistry_client.go @@ -242,7 +242,7 @@ func (c *mockclient) GetSubjectsAndVersionsByID(id int) (subjectsAndVersions []S if len(subjectsAndVersions) == 0 { err = &url.Error{ Op: "GET", - URL: c.url.String() + fmt.Sprintf(subjectsAndVersionsById, id), + URL: c.url.String() + fmt.Sprintf(subjectsAndVersionsByID, id), Err: errors.New("schema ID not found"), } } diff --git a/schemaregistry/rest_service.go b/schemaregistry/rest_service.go index 7c28d1c4f..856b7cb46 100644 --- a/schemaregistry/rest_service.go +++ b/schemaregistry/rest_service.go @@ -43,7 +43,7 @@ const ( context = "/contexts" schemasBySubject = "/schemas/ids/%d?subject=%s" - subjectsAndVersionsById = "/schemas/ids/%d/versions" + subjectsAndVersionsByID = "/schemas/ids/%d/versions" subject = "/subjects" subjects = subject + "/%s" subjectsNormalize = subject + "/%s?normalize=%t" diff --git a/schemaregistry/schemaregistry_client.go b/schemaregistry/schemaregistry_client.go index 523a6b9ca..024a327b7 100644 --- a/schemaregistry/schemaregistry_client.go +++ b/schemaregistry/schemaregistry_client.go @@ -576,7 +576,7 @@ func (c *client) GetBySubjectAndID(subject string, id int) (schema SchemaInfo, e // Returns SubjectAndVersion object on success. // This method cannot not use caching to increase performance. func (c *client) GetSubjectsAndVersionsByID(id int) (subbjectsAndVersions []SubjectAndVersion, err error) { - err = c.restService.HandleRequest(internal.NewRequest("GET", subjectsAndVersionsById, nil, id), &subbjectsAndVersions) + err = c.restService.HandleRequest(internal.NewRequest("GET", subjectsAndVersionsByID, nil, id), &subbjectsAndVersions) return } diff --git a/schemaregistry/schemaregistry_client_test.go b/schemaregistry/schemaregistry_client_test.go index 030c23bcd..a1130c950 100644 --- a/schemaregistry/schemaregistry_client_test.go +++ b/schemaregistry/schemaregistry_client_test.go @@ -67,8 +67,8 @@ func testGetBySubjectAndIDNotFound(subject string, id int) { func testGetSubjectsAndVersionsByID(id int, ids [][]int, subjects []string, versions [][]int) { expected := make([]SubjectAndVersion, 0) for subjectIdx, subject := range subjects { - for idIdx, sId := range ids[subjectIdx] { - if sId == id { + for idIdx, sID := range ids[subjectIdx] { + if sID == id { expected = append(expected, SubjectAndVersion{ Subject: subject, Version: versions[subjectIdx][idIdx],