21 lines
417 B
Go
21 lines
417 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"os"
|
|
"os/signal"
|
|
"robot-market/test-mqtt-5/internal/cli"
|
|
"syscall"
|
|
)
|
|
|
|
func main() {
|
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
|
code := run(ctx, os.Args[1:], os.Stdout, os.Stderr)
|
|
stop()
|
|
os.Exit(code)
|
|
}
|
|
func run(ctx context.Context, args []string, out, errOut io.Writer) int {
|
|
return cli.Run(ctx, args, out, errOut, false)
|
|
}
|