Fix rune conversion in csv parser (#4728)
This commit is contained in:
parent
adf2668c1d
commit
e08c975fbd
|
@ -231,7 +231,6 @@ func newCSVParser(metricName string,
|
||||||
if len(runeStr) > 1 {
|
if len(runeStr) > 1 {
|
||||||
return nil, fmt.Errorf("csv_delimiter must be a single character, got: %s", delimiter)
|
return nil, fmt.Errorf("csv_delimiter must be a single character, got: %s", delimiter)
|
||||||
}
|
}
|
||||||
delimiter = fmt.Sprintf("%v", runeStr[0])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if comment != "" {
|
if comment != "" {
|
||||||
|
@ -239,7 +238,6 @@ func newCSVParser(metricName string,
|
||||||
if len(runeStr) > 1 {
|
if len(runeStr) > 1 {
|
||||||
return nil, fmt.Errorf("csv_delimiter must be a single character, got: %s", comment)
|
return nil, fmt.Errorf("csv_delimiter must be a single character, got: %s", comment)
|
||||||
}
|
}
|
||||||
comment = fmt.Sprintf("%v", runeStr[0])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parser := &csv.Parser{
|
parser := &csv.Parser{
|
||||||
|
|
Loading…
Reference in New Issue