Skip to content

Commit 7d81b76

Browse files
committed
fix: resolve golangci-lint errors for schema registry
- Fix gci import ordering by grouping redpanda-data imports separately - Remove redundant embedded field .Schema from selectors (staticcheck QF1008) - Fix comment formatting for gofumpt compliance
1 parent 0e76b1c commit 7d81b76

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

backend/pkg/api/handle_schema_registry_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ enum MyEnumA {
340340

341341
func (s *APIIntegrationTestSuite) TestSchemaMetadata() {
342342
t := s.T()
343-
t.Skip() //todo remove skip once redpanda v26.1 is GA
343+
t.Skip() // todo remove skip once redpanda v26.1 is GA
344344
require := require.New(t)
345345
assert := assert.New(t)
346346

backend/pkg/console/schema_registry.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ func mapSubjectSchema(in sr.SubjectSchema, isSoftDeleted bool) SchemaRegistryVer
188188
}
189189

190190
var metadata *SchemaMetadata
191-
if in.Schema.SchemaMetadata != nil {
191+
if in.SchemaMetadata != nil {
192192
metadata = &SchemaMetadata{
193-
Tags: in.Schema.SchemaMetadata.Tags,
194-
Properties: in.Schema.SchemaMetadata.Properties,
195-
Sensitive: in.Schema.SchemaMetadata.Sensitive,
193+
Tags: in.SchemaMetadata.Tags,
194+
Properties: in.SchemaMetadata.Properties,
195+
Sensitive: in.SchemaMetadata.Sensitive,
196196
}
197197
}
198198

@@ -406,13 +406,13 @@ func (s *Service) getSubjectCompatibilityLevel(ctx context.Context, srClient *rp
406406

407407
// SchemaRegistryVersionedSchema describes a retrieved schema.
408408
type SchemaRegistryVersionedSchema struct {
409-
ID int `json:"id"`
410-
Version int `json:"version"`
411-
IsSoftDeleted bool `json:"isSoftDeleted"`
412-
Type sr.SchemaType `json:"type"`
413-
Schema string `json:"schema"`
414-
References []Reference `json:"references"`
415-
Metadata *SchemaMetadata `json:"metadata,omitempty"`
409+
ID int `json:"id"`
410+
Version int `json:"version"`
411+
IsSoftDeleted bool `json:"isSoftDeleted"`
412+
Type sr.SchemaType `json:"type"`
413+
Schema string `json:"schema"`
414+
References []Reference `json:"references"`
415+
Metadata *SchemaMetadata `json:"metadata,omitempty"`
416416
}
417417

418418
// Reference describes a reference to a different schema stored in the schema registry.

0 commit comments

Comments
 (0)