mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
build: fix various lint issues
revive default configuration has changed in 1.3.0. Some stuff is a bit silly (like empty blocks), but I find it easier to follow that than to try to tweak the configuration.
This commit is contained in:
@@ -22,19 +22,19 @@ func (l *logger) LogMode(gormlogger.LogLevel) gormlogger.Interface {
|
||||
return l
|
||||
}
|
||||
|
||||
func (l *logger) Info(ctx context.Context, s string, args ...interface{}) {
|
||||
func (l *logger) Info(_ context.Context, s string, args ...interface{}) {
|
||||
l.r.Info().Msgf(s, args...)
|
||||
}
|
||||
|
||||
func (l *logger) Warn(ctx context.Context, s string, args ...interface{}) {
|
||||
func (l *logger) Warn(_ context.Context, s string, args ...interface{}) {
|
||||
l.r.Warn().Msgf(s, args...)
|
||||
}
|
||||
|
||||
func (l *logger) Error(ctx context.Context, s string, args ...interface{}) {
|
||||
func (l *logger) Error(_ context.Context, s string, args ...interface{}) {
|
||||
l.r.Error().Msgf(s, args...)
|
||||
}
|
||||
|
||||
func (l *logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) {
|
||||
func (l *logger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error) {
|
||||
elapsed := time.Since(begin)
|
||||
sql, _ := fc()
|
||||
fields := gin.H{
|
||||
|
||||
@@ -49,10 +49,7 @@ func (c *Component) Start() error {
|
||||
if err := c.db.AutoMigrate(&SavedFilter{}); err != nil {
|
||||
return fmt.Errorf("cannot migrate database: %w", err)
|
||||
}
|
||||
if err := c.populate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return c.populate()
|
||||
}
|
||||
|
||||
// Stop stops the database component.
|
||||
|
||||
Reference in New Issue
Block a user