Skip to content

Commit

Permalink
[processor/transformprocessor/internal/traces]Enable gocritic in proc…
Browse files Browse the repository at this point in the history
…essor (open-telemetry#12121)

Enable gocritic in processor

Signed-off-by: xin.li <[email protected]>
  • Loading branch information
my-git9 committed Jul 12, 2022
1 parent 7b2b26b commit be646ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions processor/transformprocessor/internal/traces/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ func newPathGetSetter(path []common.Field) (common.GetSetter, error) {
if len(path) == 1 {
return accessResource(), nil
}
switch path[1].Name {
case "attributes":

if path[1].Name == "attributes" {
mapKey := path[1].MapKey
if mapKey == nil {
return accessResourceAttributes(), nil
}
return accessResourceAttributesKey(mapKey), nil
}

case "instrumentation_library":
if len(path) == 1 {
return accessInstrumentationScope(), nil
Expand Down

0 comments on commit be646ae

Please sign in to comment.