diff options
| author | Felix Hanley <felix@userspace.com.au> | 2025-01-20 04:25:05 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2025-01-20 04:25:05 +0000 |
| commit | f82adc0030a993ff25cbf70cf81d75900f455e6a (patch) | |
| tree | 74bd8e701161262fb34d415aebfef064dbb842d6 /vendor/github.com/go-sql-driver/mysql/errors.go | |
| parent | 260b74748ab6e0a10d73cd97061996bd4cc70481 (diff) | |
| download | caddy-f82adc0030a993ff25cbf70cf81d75900f455e6a.tar.gz caddy-f82adc0030a993ff25cbf70cf81d75900f455e6a.tar.bz2 | |
Upgrade caddy to 2.9.1
Diffstat (limited to 'vendor/github.com/go-sql-driver/mysql/errors.go')
| -rw-r--r-- | vendor/github.com/go-sql-driver/mysql/errors.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/github.com/go-sql-driver/mysql/errors.go b/vendor/github.com/go-sql-driver/mysql/errors.go index ff9a8f0..a7ef889 100644 --- a/vendor/github.com/go-sql-driver/mysql/errors.go +++ b/vendor/github.com/go-sql-driver/mysql/errors.go @@ -21,7 +21,7 @@ var ( ErrMalformPkt = errors.New("malformed packet") ErrNoTLS = errors.New("TLS requested but server does not support TLS") ErrCleartextPassword = errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN") - ErrNativePassword = errors.New("this user requires mysql native password authentication.") + ErrNativePassword = errors.New("this user requires mysql native password authentication") ErrOldPassword = errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords") ErrUnknownPlugin = errors.New("this authentication plugin is not supported") ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+") @@ -37,20 +37,26 @@ var ( errBadConnNoWrite = errors.New("bad connection") ) -var errLog = Logger(log.New(os.Stderr, "[mysql] ", log.Ldate|log.Ltime|log.Lshortfile)) +var defaultLogger = Logger(log.New(os.Stderr, "[mysql] ", log.Ldate|log.Ltime|log.Lshortfile)) // Logger is used to log critical error messages. type Logger interface { - Print(v ...interface{}) + Print(v ...any) } -// SetLogger is used to set the logger for critical errors. +// NopLogger is a nop implementation of the Logger interface. +type NopLogger struct{} + +// Print implements Logger interface. +func (nl *NopLogger) Print(_ ...any) {} + +// SetLogger is used to set the default logger for critical errors. // The initial logger is os.Stderr. func SetLogger(logger Logger) error { if logger == nil { return errors.New("logger is nil") } - errLog = logger + defaultLogger = logger return nil } |
