mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-18 05:25:31 +00:00
Add linting for any
(#2893)
Add gofmt rules to make sure `interface{}` is not used but only `any`.
This commit is contained in:
parent
2200998ca4
commit
2f963d70e7
2 changed files with 11 additions and 8 deletions
|
@ -1,6 +1,9 @@
|
|||
linters-settings:
|
||||
gofmt:
|
||||
simplify: true
|
||||
rewrite-rules:
|
||||
- pattern: interface{}
|
||||
replacement: any
|
||||
misspell:
|
||||
locale: US
|
||||
gofumpt:
|
||||
|
|
|
@ -22,34 +22,34 @@ import (
|
|||
|
||||
type xormigrateLogger struct{}
|
||||
|
||||
func (l *xormigrateLogger) Debug(v ...interface{}) {
|
||||
func (l *xormigrateLogger) Debug(v ...any) {
|
||||
log.Debug().Msg(fmt.Sprint(v...))
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Debugf(format string, v ...interface{}) {
|
||||
func (l *xormigrateLogger) Debugf(format string, v ...any) {
|
||||
log.Debug().Msgf(format, v...)
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Info(v ...interface{}) {
|
||||
func (l *xormigrateLogger) Info(v ...any) {
|
||||
log.Info().Msg(fmt.Sprint(v...))
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Infof(format string, v ...interface{}) {
|
||||
func (l *xormigrateLogger) Infof(format string, v ...any) {
|
||||
log.Info().Msgf(format, v...)
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Warn(v ...interface{}) {
|
||||
func (l *xormigrateLogger) Warn(v ...any) {
|
||||
log.Warn().Msg(fmt.Sprint(v...))
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Warnf(format string, v ...interface{}) {
|
||||
func (l *xormigrateLogger) Warnf(format string, v ...any) {
|
||||
log.Warn().Msgf(format, v...)
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Error(v ...interface{}) {
|
||||
func (l *xormigrateLogger) Error(v ...any) {
|
||||
log.Error().Msg(fmt.Sprint(v...))
|
||||
}
|
||||
|
||||
func (l *xormigrateLogger) Errorf(format string, v ...interface{}) {
|
||||
func (l *xormigrateLogger) Errorf(format string, v ...any) {
|
||||
log.Error().Msgf(format, v...)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue