diff --git a/cmd/pasty/main.go b/cmd/pasty/main.go index d7ef5ec..03c87b4 100644 --- a/cmd/pasty/main.go +++ b/cmd/pasty/main.go @@ -46,6 +46,10 @@ func main() { zerolog.SetGlobalLevel(level) } + // Run the configuration compatibility layer + // TODO: Remove this at a later state + configCompatibilityLayer(cfg) + // Determine the correct storage driver to use var driver storage.Driver switch strings.TrimSpace(strings.ToLower(cfg.StorageDriver)) { @@ -113,3 +117,10 @@ func main() { signal.Notify(shutdownChan, os.Interrupt) <-shutdownChan } + +func configCompatibilityLayer(cfg *config.Config) { + // Print a notice if the (now removed) Hastebin support has been enabled + if cfg.HastebinSupport { + log.Warn().Msg("You have enabled the legacy 'Hastebin support' feature. This feature has been removed.") + } +} diff --git a/internal/config/config.go b/internal/config/config.go index a1e9d52..1ce7b19 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -10,7 +10,7 @@ type Config struct { LogLevel string `default:"info" split_words:"true"` WebAddress string `default:":8080" split_words:"true"` StorageDriver string `default:"sqlite" split_words:"true"` - HastebinSupport bool `default:"false" split_words:"true"` + HastebinSupport bool `default:"false" split_words:"true"` // TODO: Legacy IDLength int `default:"6" split_words:"true"` IDCharacters string `default:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" split_words:"true"` ModificationTokens bool `default:"true" split_words:"true"`