build: upgrade to Go 1.18.1 (#373)

This commit is contained in:
Dane Strandboge
2022-04-13 15:50:35 -05:00
committed by GitHub
parent 30e64c5cc9
commit 35279515e9
11 changed files with 43 additions and 41 deletions

View File

@ -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
}

View File

@ -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, ",")
}

View File

@ -1,5 +1,4 @@
//go:build !windows
// +build !windows
package signals