Skip to content

Commit

Permalink
Fixed linter
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartboyd119 committed Sep 23, 2024
1 parent 837a16e commit 4b9c184
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
run:
skip-dirs:
- docs
- datadog
- kustomize
skip-files:
- 'wire_gen.go'
tests: false
issues:
exclude-files:
- 'wire_gen.go'
exclude-dirs:
- docs
linters-settings:
errcheck:
check-type-assertions: true
Expand Down
5 changes: 4 additions & 1 deletion schemareg.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

type schemaRegistryFactory struct {
mmu sync.Mutex
m sync.Mutex
srCls map[string]schemaregistry.Client
}

Expand Down Expand Up @@ -104,6 +104,9 @@ func (c *schemaRegistryFactory) createJson(srConfig SchemaRegistryConfig) (jsonF
}

func (c *schemaRegistryFactory) getSchemaClient(srConfig SchemaRegistryConfig) (schemaregistry.Client, error) {
c.m.Lock()
defer c.m.Unlock()

url := srConfig.URL
if url == "" {
return nil, errors.New("no schema registry url provided")
Expand Down

0 comments on commit 4b9c184

Please sign in to comment.