logQuery builds a QueryLogEntry from the connection context and sends it to the logger.
(start time.Time, query, transpiledQuery, cmdType string, resultRows, writtenRows int64, errCode, errMsg, protocol string)
| 601 | } |
| 602 | var port int |
| 603 | for _, c := range s { |
| 604 | if c < '0' || c > '9' { |
| 605 | return 0, fmt.Errorf("invalid port") |
| 606 | } |
| 607 | port = port*10 + int(c-'0') |
| 608 | } |
| 609 | return port, nil |
| 610 | } |