diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-12-01 00:52:33 +0100 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-12-01 00:52:33 +0100 |
commit | 29e9fd3136f2e2fe301cbe07967fb3bb4ffcee2a (patch) | |
tree | cf5248dc0c3efd21845062d4885ed0dd0890d9cb /pkg | |
parent | 417041797674319485bea96cb38489670ff3b2ef (diff) | |
download | lens-29e9fd3136f2e2fe301cbe07967fb3bb4ffcee2a.tar.gz lens-29e9fd3136f2e2fe301cbe07967fb3bb4ffcee2a.tar.bz2 lens-29e9fd3136f2e2fe301cbe07967fb3bb4ffcee2a.zip |
This is done until go1.21 hits alpine repository.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/ext/gorm_logger.go | 2 | ||||
-rw-r--r-- | pkg/ext/middleware.go | 5 | ||||
-rw-r--r-- | pkg/service/filesystem.go | 1 | ||||
-rw-r--r-- | pkg/worker/list_processor.go | 3 | ||||
-rw-r--r-- | pkg/worker/list_processor_test.go | 3 |
5 files changed, 7 insertions, 7 deletions
diff --git a/pkg/ext/gorm_logger.go b/pkg/ext/gorm_logger.go index f0ab592..ddced21 100644 --- a/pkg/ext/gorm_logger.go +++ b/pkg/ext/gorm_logger.go @@ -3,9 +3,9 @@ package ext import ( "context" "fmt" - "log/slog" "time" + "golang.org/x/exp/slog" "gorm.io/gorm/logger" "gorm.io/gorm/utils" ) diff --git a/pkg/ext/middleware.go b/pkg/ext/middleware.go index 38bacca..d9f06e1 100644 --- a/pkg/ext/middleware.go +++ b/pkg/ext/middleware.go @@ -4,10 +4,11 @@ import ( "context" "encoding/base64" "errors" - "log/slog" "net/http" "time" + "golang.org/x/exp/slog" + "git.sr.ht/~gabrielgio/img/pkg/database/repository" "git.sr.ht/~gabrielgio/img/pkg/service" ) @@ -47,7 +48,6 @@ func (l *LogMiddleware) HTTP(next http.HandlerFunc) http.HandlerFunc { slog.Duration("elapsed", elapsed), slog.String("path", r.URL.Path), ) - } } @@ -135,7 +135,6 @@ func NewInitialSetupMiddleware(userRepository repository.UserRepository) *Initia func (i *InitialSetupMiddleware) Check(next http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - // if user has been set to context it is logged in already token := GetUserFromCtx(r) if token != nil { diff --git a/pkg/service/filesystem.go b/pkg/service/filesystem.go index 1364fd8..34eda61 100644 --- a/pkg/service/filesystem.go +++ b/pkg/service/filesystem.go @@ -104,7 +104,6 @@ func (f *FileSystemController) IsFile(ctx context.Context, fullPath string) (boo } func (f *FileSystemController) GetPage(ctx context.Context, filename string, fullPath string) (*Page, error) { - files, err := f.fsRepository.List(fullPath) if err != nil { return nil, err diff --git a/pkg/worker/list_processor.go b/pkg/worker/list_processor.go index c4c3781..2a51466 100644 --- a/pkg/worker/list_processor.go +++ b/pkg/worker/list_processor.go @@ -3,8 +3,9 @@ package worker import ( "context" "errors" - "log/slog" "sync" + + "golang.org/x/exp/slog" ) type ( diff --git a/pkg/worker/list_processor_test.go b/pkg/worker/list_processor_test.go index 21489e8..053ebbd 100644 --- a/pkg/worker/list_processor_test.go +++ b/pkg/worker/list_processor_test.go @@ -5,11 +5,12 @@ package worker import ( "context" "errors" - "log/slog" "math/rand" "sync" "testing" + "golang.org/x/exp/slog" + "git.sr.ht/~gabrielgio/img/pkg/testkit" ) |