build: upgrade to Go 1.18.1 (#373)
This commit is contained in:
@ -148,10 +148,8 @@ func (state *CsvToLineReader) Read(p []byte) (n int, err error) {
|
||||
// detect non-standard line endings in header lines #106
|
||||
for _, col := range row {
|
||||
if idx := strings.Index(col, "\r"); idx >= 0 && idx+1 < len(col) && col[idx+1] != '\n' {
|
||||
log.Println(
|
||||
fmt.Sprintf("WARNING: %v. Only CRLF and LF line endings are supported.",
|
||||
CsvLineError{state.LineNumber, errors.New("standalone CR character found")},
|
||||
),
|
||||
log.Printf("WARNING: %v. Only CRLF and LF line endings are supported.\n",
|
||||
CsvLineError{state.LineNumber, errors.New("standalone CR character found")},
|
||||
)
|
||||
break
|
||||
}
|
||||
|
@ -283,9 +283,7 @@ func createBoolParseFn(format string) func(string) (interface{}, error) {
|
||||
if !strings.Contains(format, ":") {
|
||||
err = fmt.Errorf("unsupported boolean format: %s should be in 'true,yes,1:false,no,0' format, but no ':' is present", format)
|
||||
} else {
|
||||
colon := strings.Index(format, ":")
|
||||
t := format[:colon]
|
||||
f := format[colon+1:]
|
||||
t, f, _ := strings.Cut(format, ":")
|
||||
if t != "" {
|
||||
truthy = strings.Split(t, ",")
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package signals
|
||||
|
||||
|
Reference in New Issue
Block a user