Skip to content

Commit

Permalink
fix: remove extra closing parenthesis in sub-config error (#10479)
Browse files Browse the repository at this point in the history
#### Description

Removed an extra closing parenthesis. This corrects the formatting of
the error message for unexpected sub-config value kinds.

Found in:
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33268/files#diff-9137db5fde5eb0d6870425c0023cec1a5bdfe92f58f8a72e278b55635afc6e95R48
  • Loading branch information
rogercoll committed Jul 2, 2024
1 parent 1fa399b commit c6e3c4e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .chloggen/fix_error_format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'enhancement'

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: confmap

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove extra closing parenthesis in sub-config error

# One or more tracking issues or pull requests related to the change
issues: [10480]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
2 changes: 1 addition & 1 deletion confmap/confmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (l *Conf) Sub(key string) (*Conf, error) {
return NewFromStringMap(v), nil
}

return nil, fmt.Errorf("unexpected sub-config value kind for key:%s value:%v kind:%v)", key, data, reflect.TypeOf(data).Kind())
return nil, fmt.Errorf("unexpected sub-config value kind for key:%s value:%v kind:%v", key, data, reflect.TypeOf(data).Kind())
}

// ToStringMap creates a map[string]any from a Parser.
Expand Down

0 comments on commit c6e3c4e

Please sign in to comment.