24 lines
376 B
Go
24 lines
376 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"os/signal"
|
|
|
|
"sirherobrine23.com.br/go-bds/bds-cli/cmd"
|
|
)
|
|
|
|
func main() {
|
|
command := cmd.App()
|
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill)
|
|
defer stop()
|
|
|
|
err := command.Run(ctx, os.Args)
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Bds exit with error: %s\n", err)
|
|
os.Exit(1)
|
|
return
|
|
}
|
|
}
|