print Hastebin support removal notice

This commit is contained in:
Lukas Schulte Pelkum 2023-06-17 15:18:15 +02:00
parent bdac813e59
commit 127af0a907
No known key found for this signature in database
GPG Key ID: AB3985CECFAFC962
2 changed files with 12 additions and 1 deletions

View File

@ -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.")
}
}

View File

@ -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"`