From 97082633731f71ef069334a2e0b3b72c558e7ecd Mon Sep 17 00:00:00 2001 From: Lukas Schulte Pelkum Date: Sat, 17 Jun 2023 18:25:16 +0200 Subject: [PATCH] print specific notices for legacy storage drivers --- cmd/pasty/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/pasty/main.go b/cmd/pasty/main.go index 006144f..24f9622 100644 --- a/cmd/pasty/main.go +++ b/cmd/pasty/main.go @@ -56,6 +56,15 @@ func main() { case "sqlite": driver = sqlite.New(cfg.SQLite.File) break + case "file": + // TODO: Readme notice + log.Fatal().Msg("You have configured the legacy 'file' storage driver. This storage driver has been removed in favor of PostgreSQL and SQLite, but the latter one may be a seamless alternative for you. Head over to the projects README for more information.") + break + case "mongodb": + case "s3": + // TODO: Readme notice + log.Fatal().Msg("You have configured a legacy storage driver. This storage driver has been removed in favor of PostgreSQL and SQLite, but the migration process is well-documented. Head over to the projects README for more information.") + break default: log.Fatal().Str("driver_name", cfg.StorageDriver).Msg("An invalid storage driver name was given.") return