Skip to content

Commit

Permalink
Fix some golint naming issues (confluentinc#6) (confluentinc#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota authored Aug 14, 2024
1 parent 235c72c commit b959f0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion schemaregistry/mock_schemaregistry_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion schemaregistry/rest_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion schemaregistry/schemaregistry_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions schemaregistry/schemaregistry_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit b959f0d

Please sign in to comment.