mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Improve storage driver termination
This commit is contained in:
parent
eec83518ad
commit
27284a0b3a
@ -18,7 +18,13 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer storage.Current.Terminate()
|
||||
defer func() {
|
||||
log.Println("Terminating the storage driver...")
|
||||
err := storage.Current.Terminate()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Serve the web resources
|
||||
log.Println("Serving the web resources...")
|
||||
|
@ -33,7 +33,7 @@ func (driver *S3Driver) Initialize() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Terminate terminates the AWS S3 storage driver
|
||||
// Terminate terminates the AWS S3 storage driver (does nothing, because the AWS S3 storage driver does not need any termination)
|
||||
func (driver *S3Driver) Terminate() error {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user