mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
print Hastebin support removal notice
This commit is contained in:
parent
bdac813e59
commit
127af0a907
@ -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.")
|
||||
}
|
||||
}
|
||||
|
@ -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"`
|
||||
|
Loading…
Reference in New Issue
Block a user