mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-30 10:57:53 +08:00
19 lines
314 B
Go
19 lines
314 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
|
|
"github.com/tgdrive/teldrive/cmd"
|
|
)
|
|
|
|
func main() {
|
|
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
|
|
defer cancel()
|
|
|
|
if err := cmd.New().ExecuteContext(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|