Skip to content

Commit 52a4267

Browse files
committed
Remove underscore from variable name
Signed-off-by: Yao Hong Kok <yaokok@mathworks.com>
1 parent 4304ba2 commit 52a4267

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

exporter/collector.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ func extractLabels(logger log.Logger, data []byte, paths []string) []string {
166166
// Returns the conversion of the dynamic value- if it exists in the ValueConverter configuration
167167
func convertValueIfNeeded(m JSONMetric, value string) string {
168168
if m.ValueConverter != nil {
169-
if value_mappings, hasPathKey := m.ValueConverter[m.ValueJSONPath]; hasPathKey {
169+
if valueMappings, hasPathKey := m.ValueConverter[m.ValueJSONPath]; hasPathKey {
170170
value = strings.ToLower(value)
171171

172-
if _, hasValueKey := value_mappings[value]; hasValueKey {
173-
value = value_mappings[value]
172+
if _, hasValueKey := valueMappings[value]; hasValueKey {
173+
value = valueMappings[value]
174174
}
175175
}
176176
}

exporter/util.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ func initializeValueConverter(metric config.Metric) config.ValueConverterType {
242242
//convert all keys to lowercase
243243
if metric.ValueConverter != nil {
244244
valueConverters = make(config.ValueConverterType)
245-
for values_key, inner_map := range metric.ValueConverter {
245+
for valuesKey, innerMap := range metric.ValueConverter {
246246
//make the mappings for each value key lowercase
247-
valueConverters[values_key] = make(map[string]string)
248-
for conversion_from, conversion_to := range inner_map {
249-
valueConverters[values_key][strings.ToLower(conversion_from)] = conversion_to
247+
valueConverters[valuesKey] = make(map[string]string)
248+
for conversionFrom, conversionTo := range innerMap {
249+
valueConverters[valuesKey][strings.ToLower(conversionFrom)] = conversionTo
250250
}
251251
}
252252
}

0 commit comments

Comments
 (0)