Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Dec 17, 2024
1 parent e30a736 commit c526989
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion service/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func attributes(res *sdkresource.Resource, cfg telemetry.Config) []config.AttributeNameValue {
attrsMap := map[string]interface{}{}
attrsMap := map[string]any{}
for _, r := range res.Attributes() {
attrsMap[string(r.Key)] = r.Value.AsString()
}
Expand Down
8 changes: 4 additions & 4 deletions service/telemetry/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ func (c *Config) Unmarshal(conf *confmap.Conf) error {
return nil
}

if len(c.Metrics.Address) != 0 {
host, port, err := net.SplitHostPort(c.Metrics.Address)
if len(c.Metrics.Address) != 0 { // nolint SA1019
host, port, err := net.SplitHostPort(c.Metrics.Address) // nolint SA1019
if err != nil {
return fmt.Errorf("failing to parse metrics address %q: %w", c.Metrics.Address, err)
return fmt.Errorf("failing to parse metrics address %q: %w", c.Metrics.Address, err) // nolint SA1019
}
portInt, err := strconv.Atoi(port)
if err != nil {
return fmt.Errorf("failing to extract the port from the metrics address %q: %w", c.Metrics.Address, err)
return fmt.Errorf("failing to extract the port from the metrics address %q: %w", c.Metrics.Address, err) // nolint SA1019

Check warning on line 78 in service/telemetry/config.go

View check run for this annotation

Codecov / codecov/patch

service/telemetry/config.go#L78

Added line #L78 was not covered by tests
}

// User did not overwrite readers, so we will remove the default configured reader.
Expand Down

0 comments on commit c526989

Please sign in to comment.